Map features in EarthRanger represent geographic data, such as boundaries, roads, and points of interest. These features are imported as geospatial files and can be customized to ensure accurate and clear representation of your operational area on the EarthRanger map. EarthRanger supports shapefiles and GeoJSON file formats.
Map files in EarthRanger are organized into two levels: Display Categories and Feature Classes.
Display Categories are the top-level grouping.
Feature Classes are nested within Display Categories and provide a second layer of organization.
Both Display Categories and Feature Classes appear as expandable folders under the Map Layers section in EarthRanger. You can use EarthRanger's default Display Categories or create custom ones tailored to your needs.
The following steps guide you through importing and customizing geographic data for effective map display. You will also learn how to configure map tile layers, including setting maximum zoom levels.
The process for adding map features involves the following steps:
- Prepare a geospatial file.
- Verify/Create the corresponding Display Categories and Feature Classes
- Add the file to EarthRanger.
- Verify that the features are imported correctly.
- Ensure the features are visible in the map layers.
- Customize feature types as needed.
Step 1: Prepare a Shapefile or GeoJSON File
Geographic features can be displayed in EarthRanger by drawing geometries directly in the platform or by importing geospatial files. This section focuses on importing geospatial files.
To import files, you first need to create them using GIS software such as QGIS. Ensure that your geospatial files meet the following requirements:
- Projection: Files must use the EPSG:4326 projection.
- Attributes: Each feature must have an attribute with a unique name. This attribute will be used by EarthRanger to identify and name the features. Ensure the attribute table includes a column with unique values for each feature.
- Layers: Files must contain only one layer but can include multiple features
- Feature Type: Each file must contain only one type of feature (e.g., polygons, lines, or points). Create separate files for different feature types.
Example:
- One shapefile for park boundaries (polygons)
- A separate shapefile for rivers (lines)
Shapefiles:
If using shapefiles, collect the following file types into a single compressed (ZIP) file before importing into EarthRanger:
.cpg
.dbf
.prj
.shp
.shx
GeoJSON Files:
GeoJSON files are self-contained and support all spatial data in a single file, requiring no additional preparation.
Grouping Recommendations:
To ensure proper organization in EarthRanger:
- Include in a single file only features that should belong to the same dropdown folder (Feature Class) in EarthRanger.
- If features should appear in separate Feature Classes, use separate geospatial files even if they share the same geometry type.
Example:
In the example below, three geospatial files are uploaded into EarthRanger:
Lakes.geojson
Secondary_rivers.geojson
Primary_rivers.geojson
Each file is imported into its corresponding Feature Class. These Feature Classes (Lakes, Primary Rivers, and Secondary Rivers) are grouped under the Display Category Hydrography.
This is how the Attribute Table looked like for the Primary_Rivers.geojson file:
Step 2: Verify/Create the corresponding Display Categories and Feature Classes
Before importing your geospatial file, ensure that the appropriate Feature Class and Display Category are set up in EarthRanger. Follow these steps:
-
Check Existing Feature Classes
- Navigate to Map Layers > Feature Classes in EarthRanger admin page.
- Review the list of existing Feature Classes to see if one matches your geospatial file.
-
For example, if your file represents rivers, check for a Feature Class like Rivers under the relevant Display Category (e.g.,
Hydrography
).
-
For example, if your file represents rivers, check for a Feature Class like Rivers under the relevant Display Category (e.g.,
-
Create a New Feature Class (if needed)
- If no suitable Feature Class exists:
- Select Add Feature Class.
- Provide a clear, descriptive name (e.g.,
Primary Rivers, Roads
). - Assign the new Feature Class to an existing Display Category or create a new one by selecting the green plus icon.
- Ensure the Name Attribute matches the column in your geospatial file that contains unique feature names.
- Optionally, specify a Feature Class Attribute to further classify your features.
- If no suitable Feature Class exists:
- Save your changes.
Pro Tip: For more details about managing Feature Classes, refer to the Feature Classes article.
Step 3: Add Files to EarthRanger
Once your geospatial files are ready, follow these steps to upload them to EarthRanger:
-
Access the Feature Import Files Page
- In EarthRanger Admin, navigate to Map Layers > Feature Import Files.
-
Add a New File
- Select Add Feature Import File.
- Choose the appropriate file type (e.g., Shapefile or GeoJSON).
-
Provide File Details
- Enter a name and description for the file to help identify its contents.
- Select the corresponding Feature Class.
-
Set Attribute Fields (Optional)
- Specify the Name and ID fields according to the column names in your file’s attribute table.
- By default, EarthRanger uses columns labeled Name and ID, automatically recognizing these if they exist.
- Click Save.
Example: In the file Primary_rivers, the attribute table column containing feature names was labeled Nombre. This column was set as the Name Attribute during the import process, ensuring proper feature identification in EarthRanger.
Step 4: Verify Features are Imported Correctly
After importing, confirm that the features appear correctly on the map:
- Go to the main EarthRanger site and click on the Map Layers tab.
- Select Features to view the imported data.
- Refresh the browser to ensure the changes are displayed.
Step 5: Customize Feature Types
Once your map features are imported into EarthRanger, you can enhance their visibility by customizing their appearance.
- Polygons and Lines: Modify settings such as fill color, stroke color, stroke width, and opacity.
-
Points: Configure options like icon size and image URLs for better visual distinction.
For step-by-step instructions on how to apply these customizations, see the Feature Classes article. This guide covers detailed configurations for polygons, lines, and points, allowing you to ensure that map elements are displayed effectively for your operational needs.