- Home
- Getting Started
- Documentation
- Proxy/Firewall
- Tour the Interface
- Tour the Layers
- JMARS Video Tutorials
- Lat/Lon Grid Layer
- Map Scalebar
- Nomenclature
- Crater Counting
- 3D
- Shape Layer
- Mosaics
- Map
- Advanced/Custom Maps
- Graphic/Numeric Maps
- Custom Map Sharing
- Stamp
- THEMIS
- MOC
- Viking
- CTX
- HiRise
- HiRISE Anaglyph
- HiRISE DTM
- HRSC
- CRISM Stamp Layer
- OMEGA
- Region of Interest
- TES
- THEMIS Planning
- Investigate Layer
- Landing Site Layer
- Tutorials
- Video Tutorials
- Displaying the Main View in 3D
- Finding THEMIS Observation Opportunities
- Submitting a THEMIS Region of Interest
- Loading a Custom Map
- Viewing TES Data in JMARS
- Using the Shape Layer
- Shape Layer: Intersect, Merge, and Subtract polygons from each other
- Shape Layer: Ellipse Drawing
- Shape Layer: Selecting a non-default column for circle-radius
- Shape Layer: Selecting a non-default column for fill-color
- Shape Layer: Add a Map Sampling Column
- Shape Layer: Adding a new color column based on the values of a radius column
- Shape Layer: Using Expressions
- Using JMARS for MSIP
- Introduction to SHARAD Radargrams
- Creating Numeric Maps
- JMARS Shortcut Keys
- JMARS Data Submission
- FAQ
- Open Source
- References
- Social Media
- Podcasts/Demos
- Download JMARS
JMARS ›
Using Shape File Expressions
When working with shape layer files, you have the ability to add columns to your files. You may know that you can populate these columns with static values. But you can also populate these values with formulas. Following is an example of how to add a new column to a file, create a formula field and create an alias for a column.
- For this example, we will start with a CSV file exported from the crater counting layer. The first step is to import this file:
- Next, edit the columns of the file:
- Enter a name for a new column, make it a formula field type, click "Add Column" and select Real Number for the expression type:
- Enter the formula for the new column:
- Make sure the "update all rows" checkbox is selected and click "Okay". This will send you to the table where you can see your new column:
- Edit columns once again and create another column. This time, make it a boolean expression type:
- Enter the formula for the new column as a conditional using the formula field previously created. Note the compile error:
- To use any column that contains a space in the name, we must create an alias for that column:
- Note that the alias now shows up in the alias table:
- Update the expression for the boolean value:
- Click "Okay" and see the updated table with the boolean values set: