# Invite to Team Source: https://docs.nikaplanet.com/guides/access-control/invite-to-team Learn how to invite users to your team and manage team access permissions # Invite to Team Inviting users to your team allows you to collaborate on projects, share resources, and manage access permissions collectively. This guide will walk you through the step-by-step process of inviting new team members using the NikaPlanet interface. ## Overview Team invitations enable you to: * Add new collaborators to your workspace * Assign appropriate permission levels * Manage team access centrally * Streamline collaboration workflows ## How to Invite Users to Your Team ### Step 1: Navigate to Settings From your main workspace view, click on **Settings** in the left navigation sidebar. Navigate to Settings from Workspaces view ### Step 2: Access Team Members In the Settings section, you'll see your team information in the left sidebar. Make sure you select the right team before clicking on **Members** under your team name to access the team members page. Access Team Members section ### Step 3: Invite New Members On the Members page, you'll see a list of current team members. To add someone new, click the **"Invite people"** button below the member list. ### Step 4: Send Invitation A dialog will open where you can enter the email address of the person you want to invite. Enter their email and click **"Send request"** to send the invitation. Invite people dialog ## What Happens Next ### Invitation Sent Once you send the invitation: * The new member will appear in your Members list with a "Pending" status * An email invitation will be sent to the invitee's email address * The invitation will expire in 7 days if not accepted ### Invitee Receives Email The person you invited will receive an email that looks like this: Email invitation received The email contains: * A personalized invitation message * A **"Join Team"** button to accept the invitation * Information about the team they're being invited to join * Expiration details (7 days) ### Invitation Acceptance When the invitee clicks the **"Join Team"** button in their email: * They'll be redirected to create or sign into their NikaPlanet account * Once accepted, their status will change from "Pending" to "Active" in your Members list * They'll have immediate access to the team resources based on their assigned role ## Managing Team Members ### Current Members Your Members page shows all team members with their: * Email address * Username * Role (Owner, Member, etc.) * Actions available (delete, change role, etc.) ### Pending Invitations Track the status of sent invitations: * **Pending**: Invitation sent but not yet accepted * **Active**: User has joined the team * **Expired**: Invitation has expired and needs to be resent ### Resending Invitations If an invitation expires or the user doesn't respond, you can resend the invitation from the Members management interface. ## Permission Levels Team members typically have these access levels: * **Owner**: Full access to team settings and member management * **Member**: Can access team resources and collaborate on projects * **Custom**: Tailored permissions based on specific needs only for **Enterprise License** users ## Best Practices 1. **Clear Communication**: The invitation email automatically includes context about your team 2. **Appropriate Permissions**: Start with standard member access and adjust as needed 3. **Regular Review**: Periodically review team member access and permissions 4. **Follow Up**: Check with invitees if they haven't accepted within a few days ## Workspace Access and Team Permissions ### Creating Workspaces Under Teams When you create a new workspace using the "Create New Workspace" dialog, it will automatically be associated with the selected team and default to giving **"Can edit"** access to all team members. Create New Workspace dialog **Before Creation**: You can configure the default team access level: * **Can edit**: Team members can modify and manage the workspace * **Can comment**: Team members can view and add comments * **Can view**: Team members have read-only access * **Not shared**: Other members of the team will not be able to access this workspace ### Managing Workspace Access After Creation Once a workspace is created, you can modify team access permissions by: 1. **Opening the Share Dialog**: Click the share button in the top right corner of any workspace 2. **Accessing "People with access"**: Navigate to the "People with access" section 3. **Modifying Team Permissions**: Change the access level for "Nika's Team" or individual team members Share dialog with team access management **Available Permission Levels**: * **Can edit**: Full editing and management capabilities * **Can comment**: Ability to view and add comments * **Can view**: Read-only access to workspace content * **Not shared**: No access to the workspace **Additional Options**: * **Send invite email**: Automatically notify team members of access changes * **Individual member management**: Set different permissions for specific team members vs. the entire team ## Troubleshooting ### Common Issues * **Invitation Not Received**: Ask the invitee to check their spam/junk folder * **Permission Errors**: Ensure the user has the correct role assignments * **Team Access**: Verify the user is assigned to the correct team(s) ### Getting Help If you encounter issues with team invitations, contact your team administrator or reach out to NikaPlanet support for assistance. ## Next Steps After successfully inviting team members: * [Invite to Workspace](/guides/access-control/invite-to-workspace) - Learn how to invite users to specific workspaces # Invite to Workspace Source: https://docs.nikaplanet.com/guides/access-control/invite-to-workspace Learn how to invite users to specific workspaces and manage workspace-level access permissions # Invite to Workspace Inviting users to specific workspaces allows you to grant access to particular projects, datasets, or collaborative environments while maintaining security boundaries. This guide covers the process of inviting users to individual workspaces. ## Overview Workspace invitations provide: * Granular access control to specific projects * Secure collaboration on sensitive data * Project-specific permission management * Temporary or permanent access options ## How to Invite Users to a Workspace ### Step 1: Access the Share Dialog From your workspace dashboard, locate and click the **Share** button in the top navigation bar. This button is prominently displayed and will open the sharing interface. Workspace Dashboard with Share Button ### Step 2: Navigate to the Share Tab In the sharing dialog, you can see a dropdown to select the current workspace's sharing mode, which includes: * *Anyone with link can edit* - least secure but public access for anyone with a Nika account * *Anyone with link can comment* - same as above, but public users can not edit assets in this workspace * *Anyone with link can view* - same as above, but public users can not edit nor comment on assets in this workspace * *Only people added can access* - workspace is not open to public, but only people or teams listed in the `People with access` section above Share Dialog with Share Tab Selected Share Dialog sharing options ### Step 3: Add People or Team to Your Workspace In the **"People with access"** section, click on the input field labeled **"Add people or groups"**. This field allows you to search for and add new collaborators to your workspace. Email Input and Role Selection ### Step 4: Enter Email and Select Role Type the email address of the person you want to invite (e.g., "[david@nikaplanet.com](mailto:david@nikaplanet.com)"). After entering the email, you'll see a dropdown menu appear where you can select the appropriate role: * **Editor**: Can create, modify, and delete assets within the workspace * **Commentator**: Can view content and add comments * **Viewer**: Read-only access to workspace resources Invitation Settings Configuration Review all the invitation details including the email address, selected role, and email notification setting. Once satisfied, click the **"Share"** button at the bottom of the dialog to send the invitation. ### Step 5: Complete the Sharing Process The invited user will receive an email invitation and can accept it to join your workspace with the specified permissions. Email Invitation Sent ## Workspace Access Levels Different permission levels are available for workspace access: * **Owner**: Full control over the workspace, including deletion and member management (shown as "Owner" in the interface) * **Editor**: Can create, modify, and delete content within the workspace * **Commentator**: Can view content and add comments to workspace resources * **Viewer**: Read-only access to workspace resources and content ## Workspace-Specific Permissions ### Content Access * **Files**: in Nika's data lake for this workspace * **Notebook instances**: in [Nika Notebook](/guides/data-analysis/create-your-first-notebook) which is a Jupyter-compatible collaborative python notebook for data science analysis * **Map instances**: in [Nika Map](/guides/become-map-expert/create-your-first-map)which uses Nika's collaborative map engine that handles geospatial analysis for GB sized vector and raster data sources ### Collaboration Features * **Comments**: Enable or disable commenting capabilities * **Sharing**: Control whether users can share workspace content externally * **Export**: Manage data export and download permissions ## Managing Workspace Invitations ### Invitation Status Tracking Monitor the status of workspace invitations: * **Pending**: Invitation sent but not yet accepted * **Accepted**: User has joined the workspace * **Expired**: Invitation has expired and needs renewal ## Security Considerations ### Access Control Best Practices 1. **Principle of Least Privilege**: Grant only the minimum access necessary 2. **Regular Audits**: Periodically review workspace access and permissions 3. **Temporary Access**: Use time-limited access for external collaborators 4. **Activity Monitoring**: Track user actions within sensitive workspaces ### Data Protection * Ensure invited users understand data handling requirements * Implement appropriate data classification and access controls * Monitor for unusual access patterns or unauthorized sharing ## Troubleshooting ### Common Workspace Invitation Issues * **Permission Denied**: Verify you have edit rights to the workspace to be able to invite others into this workspace * **User Not Found**: Check email address accuracy and user account status * **Invitation Limits**: Check if you've reached workspace invitation limits ### Getting Support For workspace access issues: * Contact your team/org administrator * Review workspace settings and permissions * Reach out to support for technical assistance ## Next Steps After setting up workspace invitations: * [Invite to Team](/guides/access-control/invite-to-team) - Learn about team-level invitations # Add Layers to Map Source: https://docs.nikaplanet.com/guides/become-map-expert/add-layers-to-map Learn how to add data layers to your map using drag and drop, right-click, and file upload methods Learn how to add data layers to your NikaMap using multiple methods. You can drag files from the Files panel, upload from your desktop, or use the right-click context menu. ## Step 1: Prepare Your Data Before adding layers, make sure your data is ready: ### Supported File Formats #### Vector Data Formats * **Shapefile Components**: .shp, .shx, .dbf, .prj, .cpg, .fix, .sbn, .sbx, .fbn, .fbx, .ain, .aih, .atx, .qix, .qmd * **GeoPackage**: .gpkg (modern, efficient vector format) * **FlatGeobuf**: .fgb (fast, compressed vector format) * **GeoJSON**: .geojson, .json (web-friendly vector format) * **KML/KMZ**: .kml, .kmz (Google Earth format) * **GML**: .gml (Geography Markup Language) * **GeoParquet**: .gpq, .parquet, .geoparquet (columnar format) * **CSV**: .csv (with coordinate columns) * **Parquet**: .parquet (efficient columnar storage) * **GeoParquet**: .geoparquet (spatial extension of Parquet) #### Raster Data Formats * **GeoTIFF**: .tif, .tiff, .TIF, .TIFF (high-quality raster format) * **JPEG**: .jpg, .jpeg, .JPG, .JPEG (compressed image format) ### File Requirements * **Size Limits**: Files up to several GBs for raster and up to 500 MBs for vector are supported * **Coordinate System**: Data should have proper spatial reference that can be converted to ESPG:3857 Mercator that NikaMap uses * **File Structure**: Ensure files are not corrupted or lack of georeferencing (i.e. no lon lat coordinates at all) ## Step 2: Upload Files to Your Opened NikaMap ### Method 1: Upload via Existing Files in NikaWorkspace 1. **Open Files Panel**: Click "Files" in the left sidebar 2. **Multiselect Files**: Hold Shift/Cmd/Ctrl on your keyboard while selecting multiple files 3. **Right Click**: Right click on one of the selections and click Add to Map with the correct destination map selected 4. **Wait for Processing**: Files will be processed before adding to the map automatically. Larger files will take longer to come back because of network transimission despite encrypted Upload Files ### Method 2: Drag and Drop Files from NikaWorkspace Same as **Method 1**, just via dragging **Note**: Make sure you drop to the centered section of the map, if not it will be treated as opening it as a text file Drag from Files Panel ### Method 3: Drag from Desktop 1. **Drag Files**: Drag files directly from your desktop to the map 2. **Auto-upload**: Files will be uploaded and preprocessed before adding to the map automatically Drag from Desktop ### Method 4: Choose Desktop Files Using Upload Button 1. **Click Upload**: Left-click on Upload button from NikaMap's top bar 2. **Select Files**: Choose the relevant files from your local file system to upload as layers Right-Click Add to Map ## Step 3 Context Menu Options * **Add to Current Map**: Add to the currently active map * **Add to Specific Map**: Choose from a list of your maps * **Add as New Layer**: Create a new layer (default behavior) * **Replace Existing**: Replace an existing layer with the same name ## Step 4: Layer Reordering ### Sort Added Layers 1. **Layers Panel**: Look for the layers panel on the left side. If you dont see it, make sure a map panel is selected in the middle with left sidebar opening for list of maps 2. **Layer List**: All added layers will appear in the list at bottom left 3. **Layer Reordering**: Drag and drop a layer to make them appear on top or below. The ones at bottom will show up on top in the map Layers Panel ## Step 5: Layer Attribute Table ### View Layer Properties 1. **Right-click Layer**: Right-click on a vector layer to open `attributes` in a table format 2. **Select features**: As each row of entry in the table represents one geometry feature on map, selecting it in table will also select it on map 3. **Update Information**: Data field update in the table will immediately be saved as well, just like the geometry features on map Layer Properties ### Layer Controls * **Visibility Toggle**: Click the eye icon on a single layer to show/hide layers * **Group Visibility**: Click the same eye icon on a group of layer with folder icon to show/hide all descendent layers * **Layer Properties**: Right-click on a layer to access styling options * **Vector Functions**: Right-click on a vector layer to access function options * **Delete Layer/Group**: Right-click on a layer or group node to delete them instantly from the map ## Step 6: Copy Features to a New Layer You can copy features from one vector layer into a brand-new layer — either all features at once, or only a selected subset. ### Copy All Features 1. **Right-click** on a vector layer in the layers panel 2. Select **"Copy all features to new layer"** 3. A new layer named **"Copy of \[original name]"** appears in the layer list with all features duplicated ### Copy Selected Features 1. **Select the vector layer** by clicking on it in the layers panel 2. **Select features** on the map by clicking individual features, or multi-select from the attribute table 3. **Right-click** on the layer in the layers panel 4. The menu item now shows **"Copy N feature(s) to new layer"** where N is the number of selected features 5. Click it to create a new layer containing only the selected features 6. Your selection is automatically cleared after the copy completes This is useful for splitting a large dataset into smaller layers based on specific features of interest, or for isolating a subset of features to style or export independently. ## Step 7: Customize Layer Appearance ### Access Layer Styling 1. **Vector Layer**: Go to [Vector Layer Stylings](/guides/become-map-expert/vector-styling) to view all styles currently supported 2. **Raster Layer**: Go to [Raster Layer Stylings](/guides/become-map-expert/raster-styling) to view all visualizations currently supported ## Step 8: Export Layers from Map ### Different Export options 1. **Single Vector Layer**: Right-click to export as GeoJson from map. Choose whether to desktop or to NikaWorkspace file storage 2. **Group of Layers**: Right-click to export as GeoPackage from map. Choose whether to desktop or to NikaWorkspace file storage Layer Properties ## Step 9: Troubleshooting Common Issues ### Layer Not Appearing * **Check Visibility**: Ensure the layer is visible (eye icon) * **Zoom to Layer**: Double-click to zoom to layer from the layer list at bottom left * **Coordinate System**: Verify the data has proper spatial reference * **File Format**: Confirm the file format is supported and its layer appears in the layer list at bottom left after dragged to map ### Performance Issues * **Large Files**: Consider simplifying large datasets * **Too Many Layers**: Remove unnecessary layers * **Browser Cache**: Refresh the page if needed * **Network**: Check your internet connection ### Styling Problems * **Reset Styling**: Use the reset button in styling panel * **Default Colors**: Apply default color schemes * **Layer Order**: Ensure layers are in the correct order ## Tips and Best Practices ### Layer Management * **Logical Ordering**: Arrange layers in logical order (background to foreground) * **Naming Convention**: Use consistent naming for layers * **Grouping**: Consider grouping related layers * **Cleanup**: Remove unused layers regularly ### Performance Optimization * **File Size**: Keep individual files under reasonable size limits * **Simplification**: Simplify complex geometries when possible * **Caching**: Allow time for layers to cache properly * **Browser**: Use a modern browser for best performance ## Next Steps Now that you've added layers to your map: 1. **Style Your Layers**: Customize the appearance of your data 2. **Work with Vector Layers**: Learn about [Vector Layer in NikaMap](/guides/become-map-expert/vector-styling) 3. **Collaborate**: Explore [Collaborative Mapping](/guides/become-map-expert/collaborative-mapping) 4. **Publish**: Learn how to [Publish Your Map](/guides/become-map-expert/publish-map) Happy mapping! # Switch Base Map Source: https://docs.nikaplanet.com/guides/become-map-expert/change-base-map Base map is the styled map that your layers will be displayed on. Sometimes changing it can give you more contrast and comparison with your own layer data Switch between the three supported base map types to provide the best background for your data visualization. Switch Base Map ## Available Base Maps ### 1. **DataViz** * Clean, minimal background optimized for data visualization * Best for: Charts, graphs, and data-focused presentations ### 2. **OpenStreetMap** * Detailed street maps with roads, buildings, and place names * Best for: Urban analysis, navigation, and location-based data ### 3. **Satellite** * High-resolution satellite imagery showing natural landscape * Best for: Environmental analysis, land use studies, and remote sensing ## How to Change Base Map 1. **Right-click** on your map area 2. **Select "Change Base Map"** from the context menu 3. **Choose** your preferred base map type 4. **Changes are auto-saved** immediately ## Custom Base Maps Need a different base map? You can: * **Request new base maps** via our [community forum](https://github.com/orgs/NikaEco/discussions) * **Contact support** for custom base map URLs * **Send feedback** about base map options ## Next Steps * **Set Initial View**: Optimize your map display * **Sync Multiple Map Views**: Coordinate multiple map views * **Publish Your Map**: Share with others # Multi-user Edits on the Same Map Source: https://docs.nikaplanet.com/guides/become-map-expert/collaborative-mapping Learn how to collaborate with team members on maps with real-time editing and auto-saving features NikaMap natively supports multi-user editing and auto-saving, allowing your team to work together on the same map in real-time. Changes are synced to other users with low latency, and the system prevents race conditions by blocking layers when they're being edited. ## Step 1: Understanding Collaborative Mapping ### What is Collaborative Mapping? * **Real-time Collaboration**: Multiple users can edit the same map simultaneously * **Auto-saving**: All changes are automatically saved and synced * **Conflict Prevention**: Layer blocking prevents race conditions * **Low Latency**: Changes appear to other users almost instantly with the exception of large dataset initial load ### Collaboration Features * **Live Cursors**: See where other users are working on in the same map * **Edit History**: Track who made what changes in the edit log (to be built soon) Collaborative Mapping ## Step 2: Share Your Map for Collaboration ### Enable Collaboration * **Through NikaWorkspace**: As NikaMap is created under NikaWorkspace, simply invite others (same org or external) to the same worksapce to have immediate access * **Share Static Version in NikaHub**: The other option is to share the view-only snapshot of your map created by publishing it to NikaHub with various permission levels. See [Publish a Map (with Access Control)](/guides/become-map-expert/publish-map) for more details ### Permission Levels * **View Only**: Users can view but not edit * **Commentator**: Users can view and comment but not edit * **Edit**: Users can make changes to the map * **Admin**: Users can manage the map and permissions * **Owner**: Full control over the map ## Step 3: Real-time Editing ### Start Editing 1. **Enter Edit Mode**: Right click on a layer to find edit option or double click the layer on map to enter edit mode 2. **Make Changes**: Edit features, drag the handle around or use draw tools to add new data to the same layer 3. **Save Changes**: Click the tick in the layer list, or click empty spaces on map to leave the edit mode, which will trigger automatic save and sync ## Troubleshooting Any Issues ### Common Issues * **Layer Won't Show on Map**: If the layer source GeoTIFF or COG, check whether the source file is still there * **Changes Not Syncing**: Check your internet connection stability, if connection is regained, the previous edit should auto flow through immediately too * **Performance Issues**: Reduce the number of very dense vector layers which are the usual performance bottlenecks especially if the polygon shapes are complex ### Other Solutions * **Refresh Map**: Close the Map panel and double click to reopen it * **Support**: Contact support for persistent issues Happy Mapping! # Create your First Map Source: https://docs.nikaplanet.com/guides/become-map-expert/create-your-first-map Learn how to create a new map, customize basemaps, and set up your initial view Learn how to create a new map in NikaMap, customize basemaps, and set up your initial view. Everything gets persisted automatically, so your map will look exactly the same when you reopen it. ## Step 1: Access NikaMap 1. **Navigate to NikaMap**: In NikaWorkspace, click on the Globe icon in the left sidebar 2. **View Map List**: You'll see a list of your existing maps on the left panel 3. **Create New**: Click the "+" button to see two options. * **Draft maps** are erased on refresh * **Collaborative Saved maps** persist between sessions. For now I recommend choosing **Collaborative Saved Map** NikaMap Create 4. **First Map**: Your first map will appear in the middle of the screen NikaMap Interface ## Step 2: Rename Your Map 1. **Reame**: Right click on a map to open rename dialog 2. **Save**: Click "Save" to finalize Map Naming ## Step 3: Choose Your Basemap When creating a new map, it will by default use `dataviz` basemap, you can follow [Change Base Map](/guides/become-map-expert/change-base-map) to select other options. ## Tips and Best Practices ### Map Organization * **Descriptive Names**: Use clear, descriptive names for your maps * **Consistent Naming**: Follow a naming convention for your team * **Cleaning**: Right click to delete temporary maps that you will no longer use ### Performance * **Start Simple**: Begin with a basic basemap and add complexity gradually * **Layer Limits**: Theoretically NikaMap can load large vector and raster * **Auto Saving**: NikaMap will auto save your changes, no more worry of data loss # Modify Legend for Viewing Source: https://docs.nikaplanet.com/guides/become-map-expert/modify-legend Control which layers appear in the map legend, add captions, and understand how each layer type displays its legend The Legend view gives you a summarized, read-friendly overview of every layer on your map and what its symbology means. You can toggle layers in and out of the legend, add captions, and reorder entries by reordering the layers themselves. When your map is published, the legend shown to viewers respects these settings. You can customize which layers show their entries to most effectively present your maps. ## Accessing the Legend The layer panel has two tabs at the top: **Layers** and **Legend**. * **Layers tab**: The full layer list where you manage, reorder, and style layers * **Legend tab**: A focused view showing only the legend-relevant information for each layer Legend Tab Click the **Legend** tab to switch to the legend view. ## Legend Entry Structure Each layer included in the legend displays: 1. **Layer icon** — indicates the layer type (vector, raster, etc.) 2. **Layer name** — the name as shown in the layer list 3. **Visibility toggle** — an eye icon to show or hide the layer on the map directly from the legend 4. **Remove from legend button** — an X icon to exclude the layer from the legend without removing it from the map 5. **Caption** (if set) — descriptive text displayed below the layer name 6. **Symbology** — the visual representation of how the layer is styled (color swatches, gradients, class breaks, etc.) Legend Example ## Show and Hide Layers in the Legend By default, all layers are **included** in the legend. You can control which layers appear. ### Remove a Layer from the Legend You have two options: * In the **Legend tab**: Click the **X** button on any legend entry to remove it * In the **Layer Styles panel**: Toggle the **Show** switch off in the Legend section Layer Style Control The layer remains on the map — it is only hidden from the legend view. ### Restore a Layer to the Legend Layers removed from the legend appear in a collapsible **"Other layers"** section at the bottom of the Legend tab. 1. Click **"Other layers (N)"** to expand the section 2. Click the **arrow-up icon** next to any layer to add it back to the legend Layer Style Control Alternatively, open the layer's styling panel and toggle the **Show** switch on in the Legend section. ### Toggle Layer Visibility The **eye icon** on each legend entry controls whether the layer is visible on the map. This is the same as toggling visibility in the Layers tab — hidden layers remain in the legend but are not rendered on the map. ## Add a Caption Captions add descriptive text below the layer name in the legend entry. 1. **Select the layer** to open its styling panel 2. Expand the **Legend** section 3. Type your caption in the **Caption** field 4. The caption is saved automatically (with a short debounce delay) Captions appear in both the Legend tab and when the map is published. ## Legend Order The legend displays layers in the **same order as the layer list**. To change the legend order: 1. Switch to the **Layers** tab 2. **Drag and drop** layers to reorder them 3. Switch back to the **Legend** tab — the order is reflected immediately Layers at the bottom of the layer list render on top of the map, and appear in the same position in the legend. ## How Each Layer Type Displays in the Legend The legend automatically generates symbology based on each layer's current styling configuration. ### Vector Layers Vector layer legends are organized by geometry type when a layer contains mixed geometries. Each geometry section shows its own symbology. #### Polygons * **Solid color**: A filled square swatch showing the fill color, with an outline if stroke is enabled * **Gradient (continuous)**: A smooth color ramp bar with min/max labels, labeled by the property name * **Gradient (discrete/classify)**: A list of colored swatches with value range labels (e.g., "0.5 – 1.2") * **Unique values**: A list of colored swatches, one per unique value with its label #### Lines * **Solid color**: A horizontal line swatch in the line color * **Gradient / Unique values**: Same class-break or value list format as polygons, but with line swatches #### Points * **Solid color**: A filled circle swatch in the icon/point color * **Gradient / Unique values**: Same format as polygons, but with circle swatches ### Raster Layers Raster legend display depends on the visualization type and color mode. #### Single Channel with Named Colormap A **color ramp bar** showing the gradient from the selected colormap (e.g., Viridis, Blues), with min and max rescale values at either end. The band name or algebra expression is shown as a label. #### Single Channel with Classify A **discrete class list** showing colored swatches for each class break with value range labels (e.g., "\< 0.2", "0.2 – 0.4", ">= 0.8"). #### Single Channel with Unique Values A **value list** showing one colored swatch per unique integer value, with custom labels if set. #### RGB Channels (Multi-Channel) A three-part **red/green/blue swatch** labeled "RGB Composite", with the band assignments listed below (e.g., "R: b4 · G: b3 · B: b2"). #### Raster Algebra Displays the same as Single Channel — the algebra expression name (e.g., NDVI) is shown as the label, with the colormap gradient and rescale range. #### No Colormap Set Falls back to a **grayscale gradient** bar (black to white) with the rescale range.
Sample Legend Appearance 1 Sample Legend Appearance 2
## Best Practices * **Include only meaningful layers** — remove background or reference layers from the legend to keep it focused on the data that matters * **Add captions** to provide context — a short description like "Population density per km²" makes the legend self-explanatory * **Use consistent layer naming** — legend entries show the layer name, so clear names make the legend readable without captions * **Order layers logically** — since legend order follows layer order, arrange layers so the legend reads naturally from top to bottom # Publish a Map (with Access Control) Source: https://docs.nikaplanet.com/guides/become-map-expert/publish-map Learn how to publish your map with team-only, public or password-protected access, including thumbnail generation and collaboration features Learn how to publish your NikaMap for team-only, public, or password-protected sharing. You can publish maps with different names, generate thumbnails using AI, and control access settings. ## Step 1: Access Publish Options ### Method 1: Right-Click on Map List 1. **Open Map List**: Navigate to your maps in the left panel 2. **Right-click Map**: Right-click on the map you want to publish 3. **Select "Publish"**: Choose the publish option from the context menu Right-click to Publish ### Method 2: Publish Button in Map 1. **Open Your Map**: Open the map you want to publish 2. **Find Publish Button**: Look for the publish button in the top-right toolbar 3. **Click Publish**: Click the publish button to open the publish dialog ## Step 2: Fill in Compulsory Fields ### Required Information (marked with asterisk \*) 1. **Title**\*: Enter a descriptive name for your published map 2. **Version**\*: Specify the version number (e.g., "1.0.0") 3. **Category**\*: Add at least one category by clicking "+ Add Category" ### Optional Information * **Description**: Add a detailed description of the map content (optional) * **Tags**: Add relevant tags for categorization (optional) ### Thumbnail Options You have three options for creating a thumbnail: #### Option 1: URL * Enter an image URL in the "Image URL" field #### Option 2: Upload * Click "Upload" and select an image file from your computer #### Option 3: AI Generate (Recommended if no thumbnail) * Click "AI Generate" with the sparkle icon * AI will automatically create a relevant thumbnail based on your map content ### Access Control Settings * **Public**: Anyone from public can discover and access the map. All public content can be found at [Nika Hub](https://planet.nika.eco/en/hub) * **Password Protected**: Anyone with the link can access with password. Share the link and password with specific users * **Restricted (Team Only)**: Only people from your organization can discover and access. All team published content can be found at [Team Hub](https://planet.nika.eco/en/dashboard/team-hub) if you are already signed in Publish Dialog with Required Fields ## Step 3: Update Published Map ### Access Update Options 1. **Open Published Map**: Open your published map 2. **Find Update Button**: Look for the update option in the publish dialog 3. **Modify Information**: Change any of the following: * Title and version * Description * Categories * Thumbnail (URL, upload, or AI generate) * Tags * Access Control (Public, Password Protected, or Team Only) ### Update Process 1. **Make Changes**: Modify the desired information 2. **Review Settings**: Double-check all settings 3. **Click "Update"**: Click the update button to republish changes 4. **Alternative: Unpublish**: Use "Unpublish" button to remove from public/team access Update Published Map Dialog ## Step 4: View Published Map ### Access Published Map 1. **Click Arrow Icon**: Click the arrow icon at the top right of the publish dialog 2. **New Tab Opens**: A new browser tab will open with your published map 3. **Static View**: The map opens in a static, view-only format ### Published Map Features * **View-Only Access**: Users can view but not edit the map * **Layer Visibility**: All layers are visible as configured * **Interactive Elements**: Map maintains interactive features like zoom and pan * **Public Hub**: If published publicly, the map appears in the NikaHub Published Map View ## Best Practices ### Before Publishing * **Finalize Your Map**: Ensure all layers and styling are complete * **Set Initial View**: Position the map at the desired initial view * **Test Functionality**: Test all interactive features * **Optimize Performance**: Ensure good loading performance ### Content Quality * **Accurate Data**: Ensure data accuracy and currency * **Clear Visualization**: Create clear and informative visualizations * **Proper Styling**: Use appropriate styling and colors * **Clear Documentation**: Provide clear descriptions and documentation ### Publishing Strategy * **Consistent Naming**: Use consistent naming conventions * **Regular Updates**: Keep published maps current and updated * **Quality Assurance**: Implement quality assurance processes * **Community Engagement**: Engage with community feedback ## Troubleshooting ### Common Issues * **Publishing Fails**: Check that all required fields (marked with \*) are filled * **Thumbnail Issues**: Use AI generation if you don't have a thumbnail * **Permission Problems**: Verify access control settings (Public, Password Protected, or Team Only) * **Update Issues**: Ensure you click "Update" after making changes ### Solutions * **Validate Data**: Ensure all data is valid and properly formatted * **Check Required Fields**: Review all fields marked with asterisks * **Test Locally**: Test map functionality before publishing * **Contact Support**: Contact support for persistent issues ## Next Steps Now that you've published your map: 1. **Share**: Share your published map with your team or community 2. **Monitor**: Monitor engagement and feedback 3. **Update**: Keep your map current and updated 4. **Engage**: Engage with the community and respond to feedback Happy publishing! # Raster Layer Styling Source: https://docs.nikaplanet.com/guides/become-map-expert/raster-styling Customize raster layer visualization with band selection, color modes, range adjustments, and spectral indices Customize how your raster layers appear on the map using the Layer Styles panel. Control visualization types, band selection, color mapping, and data ranges to effectively display your raster data. Raster Layer Styling Overview ## How to Style Raster Layers ### Access Styling Panel 1. **Click on a raster layer** in the layers panel to select it 2. The **styling panel opens** on the side with all raster customization options 3. Use the **header buttons** to zoom to the layer, access layer settings (rename, remove, etc.), or unselect the layer ### Available Styling Sections #### **General Section** * **Type**: Choose visualization method — Single Channel, RGB Channels, Raster Algebra, or Hillshade * **Band Selection**: Select which bands to display (options change based on type) * **Range**: Set data range for each band using absolute values or percentiles #### **Raster Section** * **Color Mode** (Single Channel only): Choose between Named Colormap, Classify, or Unique Values * **Color**: Select a color map from grouped presets, or configure custom classification stops * **Clip** (Google Earth Engine layers only): Clip the raster to a polygon vector layer on the map * **Opacity**: Adjust layer transparency (0–100%) with a slider and numeric input * **Position**: Control layer stacking order * **Resample**: Select resampling method for zoom levels #### **Legend Section** * **Show**: Toggle legend visibility on or off * **Caption**: Add descriptive text for the layer legend #### **Popups Section** * **Show**: Configure when popup information appears (Hover Only) #### **Info Section** * **File type**: Shows raster format — Cloud Optimized GeoTIFF or GeoTIFF (with a warning if not cloud-optimized) * **File name**: Display file name * **CRS**: Show coordinate reference system ## Visualization Types Visualization Types ### Single Channel * **Display one band** at a time * **Choose band**: Select from any available band in the dataset * **Set range**: Adjust min/max values for the selected band * **Apply color mode**: Use Named Colormaps, Classify, or Unique Values ### RGB Channels Available when the raster has more than one band. * **Display three bands** mapped to red, green, and blue channels * **Band Red / Green / Blue**: Select which band maps to each channel * **Individual ranges**: Set min/max or percentile values independently for each channel ### Raster Algebra Available for non-GEE rasters with more than one band. Compute spectral indices from band math. * **Select an expression**: Choose from built-in spectral indices * **Map bands**: Assign which dataset bands correspond to each variable in the formula * **Set range**: Adjust display range for the computed result #### Built-in Spectral Indices | Index | Formula | Description | | - | - | - | | **NDVI** | `(NIR-R)/(NIR+R)` | Vegetation health and density | | **EVI** | `2.5*((NIR-R)/(NIR+6*R-7.5*B+1))` | Enhanced vegetation, high-biomass sensitivity | | **SAVI** | `((NIR-R)/(NIR+R+0.5))*(1.5)` | Soil-adjusted vegetation index | | **NDWI** | `(G-NIR)/(G+NIR)` | Water body detection | | **NBR** | `(NIR-SWIR)/(NIR+SWIR)` | Burn area and severity | | **NDRE** | `(NIR-RedEdge)/(NIR+RedEdge)` | Chlorophyll content for precision agriculture | | **GNDVI** | `(NIR-G)/(NIR+G)` | Chlorophyll concentration (more sensitive than NDVI) | | **NDBI** | `(SWIR-NIR)/(SWIR+NIR)` | Urban areas and bare soil | | **NDMI** | `(NIR-SWIR)/(NIR+SWIR)` | Vegetation water content | | **ARVI** | `(NIR-(2*R-B))/(NIR+(2*R-B))` | Atmospherically resistant vegetation | | **BSI** | `((SWIR+R)-(NIR+B))/((SWIR+R)+(NIR+B))` | Bare soil detection | | **MSAVI** | `(2*NIR+1-sqrt((2*NIR+1)^2-8*(NIR-R)))/2` | Modified soil-adjusted vegetation | | **BAI** | `1/((0.1-R)^2+(0.06-NIR)^2)` | Post-fire burn area emphasis | | **GLI** | `(2*G-R-B)/(2*G+R+B)` | Green leaf fraction estimation | | **CIG** | `(NIR/G)-1` | Leaf chlorophyll content | ### Hillshade * **Select a band** for terrain shading (currently in preview) ## Band Range Adjustment Band Range Control Click the **Range** button next to any band to open the range popover with a histogram and controls. ### Range Mode * **Absolute**: Set explicit min and max values for the band * **Percentile**: Set a low and high percentile (e.g., p2–p98) to clip outliers automatically ### Adjust Min/Max Values 1. **Open the range popover** by clicking the range display 2. **Choose a mode** — Absolute or Percentile 3. **Enter values** directly or **drag the histogram sliders** to set the range 4. **See real-time updates** on the map ### Adapt Min/Max To * **Window**: Recalculate statistics based on the current map viewport * **Entire Layer**: Reset to the full data range across the entire dataset When adapted to a window, the range button shows a visual indicator. Click **Entire Layer** to reset. ### Histogram Display * **Data distribution**: See how pixel values are spread across the band * **Draggable range sliders**: Adjust min/max directly on the histogram * **Color gradient preview**: The histogram reflects the currently applied color map ## Color Modes Color Map Options Color modes are available when using **Single Channel** visualization. RGB Channels always display the raw band values as red, green, and blue. ### Named Colormap Select from a library of predefined color maps, organized by category: | Category | Color Maps | | - | - | | **Basic** | None (grayscale) | | **Perceptually Uniform Sequential** | Blues, Greens, Oranges, Purples, Reds | | **Sequential** | Viridis, Plasma, Inferno, Magma, Cividis | | **Sequential 2** | BuGn, BuPu, GnBu, OrRd, PuBu, PuBuGn, PuRd, RdPu, YlGn, YlGnBu, YlOrBr, YlOrRd | | **Diverging** | BrBG, PRGn, PiYG, PuOr, RdBu, RdGy, RdYlBu, RdYlGn, Spectral | | **Cyclic** | Twilight, Twilight Shifted | | **Qualitative** | Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3 | | **Miscellaneous** | Gist Earth, Terrain, Ocean, Jet, Rainbow, Cubehelix, and more | Each color map shows a **gradient preview** in the dropdown so you can see the colors before applying. ### Classify Group pixel values into discrete classes with custom color stops. * **Preset ramp**: Choose a starting color ramp * **Number of classes**: Set how many bins to divide the data into (default: 5) * **Apply**: Generate evenly spaced class breaks from the preset * **Edit individual stops**: Adjust break values and colors for each class Classify Example ### Unique Values Available when all pixel values in the band are integers (up to 100 unique values). * **Preset ramp**: Apply a color ramp across all unique values * **Edit individual colors**: Click any color swatch to customize * **Labels**: Add descriptive labels to each unique value for the legend Unique Values Example ## Resampling Methods Control how pixel values are interpolated when zooming. Available methods: * **Nearest**: No interpolation, preserves original values * **Bilinear**: Linear interpolation between 4 nearest pixels * **Cubic**: Cubic interpolation for smoother results * **Cubic Spline**: Spline-based cubic interpolation * **Lanczos**: High-quality resampling with Lanczos windowing * **Average**: Average of contributing pixels * **Mode**: Most common value among contributing pixels * **Gauss**: Gaussian-weighted interpolation * **RMS**: Root mean square of contributing pixels ## Auto-Save Feature All styling changes are **automatically saved** for future sessions: * **Settings persist** when you close and reopen the map * **No manual saving** required * **Consistent appearance** across sessions * **Team collaboration** benefits from saved settings ## Best Practices ### Choose Appropriate Visualization * **Single Channel**: For analyzing individual bands with color mapping * **RGB Channels**: For natural color or false color composites * **Raster Algebra**: For computing spectral indices like NDVI, NDWI, or custom band math ### Set Optimal Ranges * **Use percentile mode** (e.g., p2–p98) to handle outliers without manual tuning * **Use the histogram** to understand data distribution before setting ranges * **Adapt to Window** to focus on the area you're currently viewing ### Select Suitable Color Modes * **Named Colormap**: Best for continuous data — choose sequential for one-directional data (elevation, temperature) or diverging for data with a meaningful midpoint * **Classify**: Best for categorizing continuous data into meaningful groups * **Unique Values**: Best for categorical/integer rasters like land cover or classification results ## Next Steps * **Add More Raster Layers**: Combine multiple raster datasets * **Create Composites**: Build custom band combinations with Raster Algebra * **Publish Your Map**: Share your styled raster layers # Set Initial View Source: https://docs.nikaplanet.com/guides/become-map-expert/set-initial-view Save the current map view as the default opening view Save your current map view (zoom level and center position) so that whenever the map is reopened, it starts from that exact view state. Set Initial View ## How to Set Initial View ### Save Current View 1. **Navigate to your desired view** - pan and zoom to the perfect position 2. **Click the "Save Initial View" button** in the top toolbar 3. **View is now saved** - the map will open to this view every time ### What Gets Saved * **Center position** - the geographic center of the map * **Zoom level** - how close or far the view is * **Current view state** - exactly as you see it now ### Update Initial View * **Navigate to a new view** and click the save button again * **Previous view is replaced** with the new one * **All future opens** will use the updated view ## Use Cases * **Focus on important data** - center on your key analysis area * **Professional presentation** - ensure others see the right view first * **Consistent experience** - everyone opens to the same view * **Save time** - no need to navigate to the right view each time ## Next Steps * **Publish Your Map**: Share your map with the saved initial view * **Add More Layers**: Enhance your map with additional data # Sync Multiple Map Views Source: https://docs.nikaplanet.com/guides/become-map-expert/sync-multiple-maps Synchronize view states across all opened maps for coordinated navigation Synchronize the center and zoom level across all opened maps with a simple button click. When enabled, panning and zooming on any map will move all other maps to the same view state. Map Synchronization ## How to Sync Maps ### Enable Synchronization 1. **Open multiple maps** in separate panels 2. **Click the sync button** in the top toolbar of any map panel 3. **All maps are now synchronized** - panning or zooming on one map moves all others ### What Gets Synced * **Center position** - all maps show the same geographic center * **Zoom level** - all maps maintain the same zoom level * **Real-time updates** - changes happen instantly across all maps ### Disable Synchronization * **Click the sync button again** to turn off synchronization * **Maps return to independent navigation** - each map can be moved separately ## Use Cases * **Compare different datasets** on the same area * **View different base maps** at the same location * **Analyze multiple time periods** side by side * **Coordinate team analysis** with consistent views ## Next Steps * **Set Initial View**: Optimize your synchronized map display * **Publish Your Maps**: Share synchronized views with others # Vector Layer Styling Source: https://docs.nikaplanet.com/guides/become-map-expert/vector-styling Customize the appearance of vector layers with polygon fill, line, point icon, text label, and legend options Customize how your vector layers appear on the map using the Layer Styles panel. Control fill colors, line widths, point icons, text labels, and more to make your data stand out. ## How to Style Vector Layers ### Access Styling Panel 1. **Click on a vector layer** in the layers panel to select it 2. The **styling panel opens** on the side with all vector customization options 3. Use the **header buttons** to zoom to the layer, access layer settings (rename, remove, export, etc.), or unselect the layer The panel automatically detects your layer's geometry types (points, lines, polygons) and shows only the relevant styling sections. Top Panel Controls ### Available Styling Sections #### **Polygon Style** (polygon layers) * **Fill Color Type**: Choose between Solid, Gradient, or Unique Values * **Fill Color**: Pick a color and adjust opacity (0–100%) when using Solid mode * **Gradient**: Color polygons based on a numeric property using a color ramp with continuous or discrete interpolation * **Unique Values**: Assign distinct colors to each unique value of a chosen property, with preset ramp or custom colors * **Elevation Field**: Extrude polygons in 3D based on a numeric property * **Polygon Outlines**: Toggle stroke visibility on or off * **Add Polygon Text**: Generate text labels at polygon centroids by selecting a property (creates a new point layer) Polygon Styles #### **Line Style** (line layers and polygon outlines) * **Line Width**: Set thickness using a slider or numeric input, with unit selection (pixels, meters, km) * **Line Type**: Choose between Solid or Dashed * **Dash Parameters**: When dashed, configure dash length and gap (as multiples of line width) * **Line Color Type**: Choose between Solid, Gradient, or Unique Values * **Line Color**: Pick a color and adjust opacity (0–100%) when using Solid mode * **Gradient**: Color lines based on a numeric property using a color ramp with continuous or discrete interpolation * **Unique Values**: Assign distinct colors to each unique value of a chosen property Line Styles #### **Point Style** (point layers) * **Icon Color Type**: Choose between Base SVG, Solid, Gradient, or Unique Values * **Icon Color**: Pick a color and adjust opacity (0–100%) when using Solid mode * **Gradient**: Color points based on a numeric property using a color ramp * **Unique Values**: Assign distinct colors to each unique value of a chosen property * **Icon Size Type**: Choose between Constant, Proportional, or Ranges * **Icon Size**: Set a fixed size with unit selection (pixels, meters, km) when using Constant mode * **Proportional Size**: Scale icon size between a min and max based on a numeric property, with linear or logarithmic normalization * **Range Size**: Define custom size ranges based on a numeric property * **Icon Anchor Point**: Set where the icon anchors to the point — Top, Middle, or Bottom * **Icon**: Choose from default icon groups or upload custom SVG icons (searchable library with grouped categories) * **Point Labels**: Toggle text labels on points Point Styles #### **Text Style** (point layers with labels enabled) * **Text Property**: Select which feature property to display as text * **Text Color**: Pick a color and adjust opacity (0–100%) * **Font Family**: Choose from Arial, Courier New, Helvetica, Inter, JetBrains Mono, Libre Baskerville, Merriweather, Noto Sans, Roboto, or Times New Roman * **Text Background**: Toggle a background rectangle behind text labels * **Background Color**: Pick a color and adjust opacity when background is enabled * **Background Corner Radius**: Adjust border radius of the background rectangle (0–50) * **Text Size**: Set size with unit selection (pixels, meters, km) * **Line Width Limit**: Optionally limit how wide a text line can be before wrapping (1–50 characters) * **Text Outline Color**: Pick a halo/outline color and adjust opacity * **Text Outline Width**: Set the outline thickness (0–10) * **Text Position**: Choose anchor and alignment using a 3×3 directional grid * **Text Pixel Offset X/Y**: Fine-tune text position with pixel offsets Text Styles #### **Legend Section** * **Show**: Toggle whether the layer appears in the legend * **Caption**: Add descriptive text for the layer legend #### **Popups Section** * **Show**: Configure when popup information appears (Hover Only) #### **Info Section** * **Features Selected**: View how many features are currently selected, with an option to unselect all Misc Sections ## Color Modes These color modes apply to both **Polygon Style** and **Line Style** sections. The same three modes are also available for **Point Style** icon coloring (with an additional Base SVG option for points). ### Solid * **Pick a single color** from the color picker * **Adjust opacity** with the slider (0–100%) * All features in the layer share the same color Solid Coloring ### Gradient Color features based on a numeric property value. 1. **Select a numeric property** from the dropdown 2. **Choose a preset color ramp** or customize individual stops 3. **Set interpolation method** — Continuous for smooth gradients or Discrete for classified breaks 4. **Configure number of classes** and apply to generate evenly spaced class breaks Gradient Coloring ### Unique Values Assign a distinct color to each unique value of a chosen property. 1. **Select any property** from the dropdown 2. **Choose a preset color ramp** (including random) or customize individual colors 3. **Edit individual colors** by clicking any color swatch Unique Values Coloring ## Icon Library The icon picker provides a searchable library of icons organized by category. ### Default Icons Browse grouped icon categories with visual previews. Icons render with the current icon color and anchor settings. ### Custom Icons Upload your own SVG icons to use as point symbols. Custom icons can be renamed and deleted via the context menu. We recommend using [Lucide](https://lucide.dev) for custom SVG icons. Custom Icons ## Auto-Save Feature All styling changes are **automatically saved** for future sessions: * **Settings persist** when you close and reopen the map * **No manual saving** required * **Consistent appearance** across sessions * **Team collaboration** benefits from saved settings ## Best Practices ### Choose Appropriate Styling by Geometry * **Polygon layers**: Use fill color modes (Solid, Gradient, Unique Values) combined with elevation for 3D effects * **Line layers**: Adjust width, dash patterns, and color modes to distinguish different line features * **Point layers**: Combine icon selection, sizing modes, and text labels for maximum clarity ### Color Modes * **Solid**: Best for layers where all features represent the same category * **Gradient**: Best for continuous numeric data like population density, temperature, or elevation * **Unique Values**: Best for categorical data like land use types, status codes, or region names ### Text Labels * **Enable text background** for better readability over complex base maps * **Adjust outline color and width** to create contrast with the map underneath * **Use the position grid** to avoid overlapping text with the icon itself ## Next Steps * **Add More Layers**: Enhance your map with additional data * **Publish Your Map**: Share your styled vector layers # Best Practices Source: https://docs.nikaplanet.com/guides/best-practices/best-practices Learn best practices for using Nika platform effectively ## Best Practices Follow these best practices to maximize productivity and collaboration in Nika platform. ## Workspace Organization ### One Project, One Workspace * **Logical Separation**: Create separate workspaces for each project * **Data Management**: Easier to manage project-specific data and resources * **Resource Isolation**: Keep project resources organized and accessible * **Clean Structure**: Maintain clear boundaries between different projects ### Benefits of Project-Based Workspaces * **Focused Environment**: Dedicated space for each project's needs * **Efficient Resource Management**: Better control over data, notebooks, and maps * **Simplified Collaboration**: Team members can focus on specific projects * **Easier Maintenance**: Streamlined project lifecycle management ## Team Collaboration ### Team-Based Access * **Invite to Team**: Add team members directly to your team for full access * **Workspace Access**: Team members get access to all workspaces under the team * **Shared Resources**: Collaborate on data, notebooks, and analysis * **Unified Management**: Centralized team and workspace administration ### Best Practices for Teams * **Clear Roles**: Define team member roles and permissions * **Consistent Naming**: Use consistent naming conventions across workspaces * **Regular Communication**: Keep team informed about workspace changes * **Resource Sharing**: Leverage shared resources for efficiency ## Resource Management ### Data Organization * **Structured Folders**: Organize data in logical folder structures * **Clear Naming**: Use descriptive names for files and datasets * **Version Control**: Maintain version history for important data * **Documentation**: Document data sources and processing steps ### Workspace Efficiency * **Regular Cleanup**: Remove unused resources and data * **Resource Monitoring**: Keep track of workspace usage and costs * **Backup Strategy**: Implement regular backups for critical data * **Performance Optimization**: Use appropriate VM configurations for workloads *Last updated: August 2025* # Performance Source: https://docs.nikaplanet.com/guides/best-practices/performance Learn how to optimize performance in Nika platform ## Performance Nika platform leverages advanced data lakehouse architecture to deliver exceptional performance across all services. ## Data Lakehouse Architecture ### Unified Data Platform * **Single Architecture**: Notebooks, maps, storage, databases, and VMs all powered by one platform * **Data Lakehouse**: Combines data lake flexibility with data warehouse performance * **Unified Access**: Seamless data access across all Nika services ### Scalable Infrastructure * **100TB+ Data Hosting**: Standard capacity for any analysis workload * **PB-Scale Enterprise**: Petabyte-scale support for large enterprise workloads * **Auto-Scaling**: Dynamic resource allocation based on demand ## Performance Features ### High-Performance Computing * **GPU Acceleration**: NVIDIA T4 and H100 GPU support for ML workloads * **Multi-Core Processing**: Up to 30 CPU cores for parallel processing * **Memory Optimization**: Up to 156GB RAM for large dataset handling ### Data Processing * **Streaming Execution**: Real-time data processing and analysis * **Background Processing**: Long-running tasks continue when workspace is closed * **Optimized Storage**: Efficient data formats and compression ### Network Performance * **High-Bandwidth**: Fast data transfer and access * **Global CDN**: Content delivery network for worldwide access * **Low Latency**: Minimal delay for interactive operations ## Optimization Best Practices ### Data Management * **Efficient Formats**: Use optimized file formats (Parquet, COG) * **Partitioning**: Implement data partitioning for faster queries * **Caching**: Leverage built-in caching for repeated operations ### Resource Utilization * **Right-Sized VMs**: Choose appropriate machine configurations * **Batch Processing**: Process data in manageable chunks * **Memory Management**: Clean up large variables when done ### Code Optimization * **Vectorized Operations**: Use vectorized operations over loops * **Parallel Processing**: Utilize multiple cores for computation * **Efficient Libraries**: Use optimized libraries (NumPy, Pandas, GDAL) ## Performance Monitoring ### Real-Time Metrics * **Resource Usage**: Monitor CPU, memory, and GPU utilization * **Execution Time**: Track code execution performance * **Data Throughput**: Measure data processing speeds ### Optimization Tools * **Built-in Profiling**: Performance analysis tools * **Resource Monitoring**: Real-time resource tracking * **Performance Alerts**: Automatic performance notifications *Last updated: August 2025* # Security Source: https://docs.nikaplanet.com/guides/best-practices/security Learn about security best practices in Nika platform ## Security Nika platform maintains the highest security standards with comprehensive compliance and ongoing audits. ## Compliance & Certifications ### Government Security Clearance * **29 Security Checks Passed**: Successfully completed with Singapore government clients * **Government-Grade Security**: Meets stringent government security requirements * **Multi-Agency Validation**: Approved across multiple government agencies ### SOC II Compliance * **SOC II Audit in Progress**: Currently undergoing comprehensive SOC II Type II audit * **Industry Standard**: Following AICPA Trust Services Criteria * **Continuous Monitoring**: Ongoing security controls and monitoring ## Security Measures ### Data Protection * **Encryption in Transit**: TLS 1.3 encryption for all data transmission * **Encryption at Rest**: AES-256 encryption for stored data * **End-to-End Encryption**: Complete data protection throughout lifecycle ### Access Control * **Multi-Factor Authentication (MFA)**: Optional for enterprise accounts * **Role-Based Access Control (RBAC)**: Granular permissions management within team * **Session Management**: Secure session handling and timeout controls ### Infrastructure Security * **Secure Cloud Infrastructure**: Enterprise-grade cloud security * **Network Security**: Advanced firewall and DDoS protection * **Regular Security Updates**: Automated security patch management ### Compliance Standards * **GDPR Compliance**: Full compliance with data protection regulations * **ISO 27001 Framework**: Information security management system * **Regular Penetration Testing**: Ongoing security vulnerability assessments ## Security Contact For security-related inquiries: * **Security Team**: [security@nikaplanet.com](mailto:security@nikaplanet.com) * **Compliance Questions**: [compliance@nikaplanet.com](mailto:compliance@nikaplanet.com) *Last updated: August 2025* # Delegate functions to run in NIKA Planet Runner Source: https://docs.nikaplanet.com/guides/code-cloud-delegation/python-sdk Use the NIKA Python SDK to submit notebook functions to managed cloud containers for isolated, long-running execution. The NIKA Python SDK lets you mark a Python function as cloud-runnable, keep the normal local call path for debugging, and explicitly submit the same function to NIKA-managed compute when you need isolated execution. For now, code cloud delegation is designed to run from NIKA cloud notebooks. Local terminals and external notebooks can still import the SDK for development, but remote submission is not a supported workflow outside NIKA notebooks yet. ## Prerequisites * A cloud NIKA notebook with a running machine * Access to the workspace or project where the delegated run should execute * Python code that can be serialized or imported by the remote worker * Any third-party packages declared in `requirements` * Inputs and outputs passed as serializable values, workspace file paths, dataset IDs, or other managed references The SDK package is named `nika_py` and exposes the Python module `nika_py`. The public SDK surface uses run and run-configuration APIs. ```python theme={null} from nika_py import RunConfig, list_runs, load_run, run ``` ## Available SDK Functions Use these entrypoints from `nika_py`: | Function or method | What it does | | - | - | | `run(compute=..., run_timeout_hours=..., requirements=...)` | Decorates a Python function so it can still run locally and can also be submitted to NIKA cloud compute. | | `RunConfig(name=...)` | Defines per-submission configuration for one delegated run. | | `decorated_function(...)` | Calls the original Python function locally in the current notebook kernel. | | `decorated_function.local(...)` | Explicitly calls the original Python function locally. | | `decorated_function.submit(..., config=RunConfig(...))` | Submits one invocation to NIKA cloud compute and returns a `RunHandle`. | | `decorated_function.load(run_id)` | Returns a `RunHandle` for an existing run using the decorated function's client configuration. | | `load_run(run_id)` | Returns a `RunHandle` for an existing run. | | `list_runs(status=..., name=..., limit=..., cursor=..., parent_run_id=...)` | Returns a `RunPage` with one page of `RunHandle` objects plus `next_cursor` for pagination. | | `run_handle.status()` | Fetches the current run status. | | `run_handle.logs(tail=...)` | Fetches logs, optionally limited to the most recent lines. | | `run_handle.result()` | Returns the Python result once the run has completed, and raises if the run is still active or failed. | | `run_handle.wait(timeout=..., poll_interval=...)` | Polls until the result is ready or the wait timeout is reached. | | `run_handle.cancel(poll_interval=...)` | Requests cancellation for a still-running run and returns a `RunCancellation` awaitable. | | `run_handle.children(status=..., name=..., limit=...)` | Lists recent child runs whose parent is the current run. | | `run_handle.parent()` | Loads the parent run when the current handle has parent metadata. | ## Step 1: Decorate a Function Use `@run` to define the compute target, timeouts, and dependency requirements for the remote invocation. Calling the function normally still runs it in the current notebook kernel. ```python theme={null} from pathlib import Path import geopandas as gpd from nika_py import run @run( compute="CPUx7", run_timeout_hours=2, requirements=[ "geopandas>=0.14", "pyogrio>=0.7", "shapely>=2.0", ], ) def build_buffer_summary( input_path: str, output_path: str, distance_m: float, ) -> dict[str, object]: source = gpd.read_file(input_path) source_crs = source.crs projected = source.to_crs(epsg=3857) buffered = projected.copy() buffered["geometry"] = projected.geometry.buffer(distance_m) buffered = buffered.to_crs(source_crs) Path(output_path).parent.mkdir(parents=True, exist_ok=True) buffered.to_file(output_path, driver="GeoJSON") return { "input_features": int(len(source)), "output_features": int(len(buffered)), "output_path": output_path, } ``` Use direct execution first when you are still checking the logic: ```python theme={null} preview = build_buffer_summary.local( "/workspace/data/site-boundary.geojson", "/workspace/outputs/site-boundary-buffered.geojson", 50, ) preview ``` `build_buffer_summary(...)` and `build_buffer_summary.local(...)` both run in the notebook kernel. Nothing is submitted to cloud delegation until you call `.submit(...)`. ## Step 2: Submit to Cloud Compute Call `.submit(...)` to serialize the invocation and send it to the NIKA cloud runner available from the notebook. ```python theme={null} from nika_py import RunConfig run = build_buffer_summary.submit( "/workspace/data/site-boundary.geojson", "/workspace/outputs/site-boundary-buffered.geojson", 50, config=RunConfig(name="site-buffer-summary"), ) run.run_id ``` You can also choose to fan out multiple runs with custom names. ```python theme={null} runs = [build_buffer_summary.submit( "/workspace/data/site-boundary.geojson", "/workspace/outputs/site-boundary-buffered.geojson", 50, config=RunConfig(name=f"site-buffer-summary-{i}"), ) for i in range(5)] print([run.run_id for run in runs]) ``` The returned `RunHandle` is a lightweight reference to the remote run. It can poll status, fetch logs, wait for a result, or request cancellation. ```python theme={null} print(run.status()) print(run.logs(tail=200)) result = run.wait(timeout=3600, poll_interval=5) result ``` If you call `run.result()` while the run is still `pending`, `initializing`, `running`, or `cancelling`, the SDK raises `RunNotCompleteError`. Use `run.wait(...)` when the notebook should block until the result is ready. The `timeout` argument on `run.wait(...)` is in seconds and only controls how long the notebook blocks — it never affects the run itself. The `run_timeout_hours` and `queue_timeout_hours` options on `@run(...)` are in hours and bound the run. ## Step 3: Choose Compute and Runtime Options The decorator currently accepts these options: | Option | Description | | - | - | | `compute` | Machine type requested for the delegated run. Supported presets include `CPUx3`, `CPUx7`, `CPUx20`, `CPUx42`, `T4x1`, `T4x2`, `T4x4`, and `H100x1`. | | `run_timeout_hours` | Optional positive integer in hours, defaulting to `1`. Bounds execution once the run has a machine. The SDK always sends a value, so omitting it submits a one-hour execution timeout rather than deferring to the server. | | `queue_timeout_hours` | Optional positive integer in hours, at most 336 hours (14 days). Maximum time the run may wait for compute before it is failed. Omit it and the SDK leaves it out of the request entirely, so the server applies its own default of 24 hours. | | `requirements` | Optional list of Python package requirement strings, such as `["pandas>=2.0", "rasterio==1.3.10"]`. Requirements are validated before submission. | The remote platform may reject compute types that are not enabled for your workspace. Start with the smallest machine that matches the memory or GPU profile of the task, then scale up only when the logs or runtime behavior show that the run needs it. Per-run configuration is passed to `.submit(...)` with `RunConfig`: | Config field | Description | | - | - | | `name` | Optional run label used for exact-match filtering with `list_runs(name=...)`. | Run names are optional, can be up to 63 characters, and must match `^[a-zA-Z0-9]([-a-zA-Z0-9_.]*[a-zA-Z0-9])?$`. Use them for stable labels such as `site-buffer-summary`, `nightly-index`, or `experiment-1`. Because `.submit(..., config=RunConfig(...))` reserves the `config` keyword for SDK configuration, a function decorated with `@run` cannot define a parameter named `config`. ## Step 4: Reconnect to Existing Runs Use `load_run(...)` when you already have a run ID from a previous cell, browser refresh, or shared notebook note. ```python theme={null} from nika_py import load_run run = load_run("nr--20260612143005-6d9e736b188d47fc") print(run.status()) print(run.logs(tail=100)) ``` If you are working from the decorated function object, use `.load(...)` to reuse the same client configuration: ```python theme={null} run = build_buffer_summary.load("nr--20260612143005-6d9e736b188d47fc") print(run.status()) ``` Use `list_runs(...)` to retrieve one page of runs visible from the notebook. The returned `RunPage` contains `runs` and `next_cursor`. ```python theme={null} from nika_py import list_runs page = list_runs(status="running", limit=20) for run in page.runs: print(run.run_id, run.status()) while page.next_cursor is not None: page = list_runs(status="running", limit=20, cursor=page.next_cursor) for run in page.runs: print(run.run_id, run.status()) ``` Allowed status filters are `pending`, `initializing`, `running`, `cancelling`, `succeeded`, `failed`, and `cancelled`. The `name` filter is an exact match on the run name, `limit` must be between `1` and `200`, and `cursor` should only be set from a previous page's `next_cursor`. You can also filter child runs client-side with `parent_run_id`: ```python theme={null} children_page = list_runs(parent_run_id=run.run_id) for child in children_page.runs: print(child.run_id, child.parent_run_id, child.status()) ``` ## Step 5: Track Child Runs When code inside a delegated run submits more work, the SDK can link the nested submission back to the run that started it. Notebook submissions do not set a parent and remain root runs. Every returned `RunHandle` exposes `parent_run_id`, which is `None` for root runs. Handles returned from `load_run(...)` and `list_runs(...)` also carry snapshot metadata when the gateway provides it, including `name`, `machine_type`, `run_timeout_hours`, `queue_timeout_hours`, `last_status`, `created_at`, `started_at`, and `finished_at`. `list_runs(parent_run_id=...)` retrieves one page of recent runs and filters that page locally. You can use handle helpers when you are navigating a run tree: ```python theme={null} children = run.children(status="running", limit=20) for child in children: print(child.run_id, child.parent_run_id) parent = children[0].parent() if children else None ``` ## Step 6: Cancel a Running Run If a delegated run is no longer needed, call `cancel()` on its handle. ```python theme={null} cancellation = run.cancel() print(cancellation.last_status) await cancellation ``` Cancellation is asynchronous. Calling `run.cancel()` sends the cancellation request immediately and returns a `RunCancellation` object. The object exposes `last_status` and `done`; when awaited, it polls until the backend reports `cancelled`. If the run reaches `succeeded` or `failed` before cancellation completes, awaiting the cancellation raises `RemoteRunError`. ## How Delegation Works When you call `.submit(...)`, the SDK builds an invocation envelope and submits it to NIKA cloud compute: 1. The decorated function is converted into a function bundle. 2. Positional and keyword arguments are serialized with `cloudpickle`. 3. Runtime options are attached as `compute` and `run_timeout_hours` (always sent, `1` when you don't set it), plus optional `queue_timeout_hours`, optional `requirements`, and optional per-run `name` from `RunConfig`. 4. If the submitting process is already inside a delegated run, the SDK includes parent-run metadata. 5. NIKA returns `run_id`, and the remote runner starts an isolated worker, executes the function, stores logs, and makes the result available to the handle. New runs use the `nr--...` run ID format, while older `nr-<32 hex>` IDs remain valid for loading, status checks, logs, results, cancellation, and parent-run metadata. The status lifecycle is `pending` → `initializing` → `running`, then one of `succeeded`, `failed`, or `cancelled`. A short-lived `cancelling` status appears after `run.cancel()` while the operator tears down the worker. Unknown future statuses are treated defensively as running by the SDK. When a result is ready, the runner can return either an inline pickled `result` payload or a `result_url`. For large or stored results, the SDK fetches the signed `result_url`, decodes the `cloudpickle` bytes, and returns the Python object from `run.result()` or `run.wait(...)`. The SDK uses two bundling strategies: | Bundle kind | When it is used | Operational impact | | - | - | - | | `module_ref` | The function lives in an importable Python module. | The envelope contains the module name, qualified function name, source hash, runtime metadata, and arguments. This is the more reproducible path because the worker imports code from an installed package or image. | | `cloudpickle` | The function is defined in a notebook cell, `__main__`, a REPL, or a nested scope. | The function object is serialized with `cloudpickle`, including referenced globals and closure variables. This is the normal notebook experience, but it depends on compatible Python and cloudpickle versions between the notebook and worker. | Most cloud notebook usage will use `cloudpickle` because functions are usually defined in notebook cells. Keep those functions focused: pass large datasets by path or ID, not by capturing a large dataframe in a closure. ## Serialization Guidelines Delegated functions should have clear boundaries. The SDK can serialize ordinary Python values, but remote execution is more reliable when the function receives references to data instead of live objects from the notebook session. Prefer: * Strings, numbers, booleans, lists, dictionaries, and dataclasses * Workspace file paths such as `/workspace/data/input.geojson` * Dataset IDs, table names, object storage URLs, or other managed references * Return values that are small enough to serialize comfortably * Output files written to explicit workspace paths Avoid capturing: * Open file handles * Database connections * Sockets or clients with active network state * GPU tensors or model objects already loaded in notebook memory * Large pandas or GeoPandas dataframes in closure variables * Secrets embedded in source code or closures If a result is large, write it to a workspace file and return metadata: ```python theme={null} return { "status": "ok", "output_path": output_path, "feature_count": int(len(buffered)), } ``` ## Troubleshooting ### `AuthenticationError` or `ConfigurationError` The SDK cannot use the notebook's cloud delegation context. Make sure the code is running inside a cloud NIKA notebook. Local Python processes are not a supported delegation environment at the moment. ### `RunNotCompleteError` The run has not reached a terminal state yet. Check `run.status()` and `run.logs(tail=200)`, or use: ```python theme={null} result = run.wait(timeout=3600, poll_interval=5) ``` ### Remote Dependency Errors Add the missing package to `requirements` and pin versions when reproducibility matters. ```python theme={null} @run( compute="CPUx7", run_timeout_hours=2, requirements=["rasterio==1.3.10", "geopandas>=0.14"], ) def process_raster(path: str) -> dict[str, object]: ... ``` ### Cloudpickle Runtime Mismatch Notebook-defined functions are serialized as Python code objects. If the worker uses a different Python minor version than the notebook kernel, unpickling can fail. Use the cloud notebook runtime selected by NIKA, keep functions simple, or move production code into an importable module so the SDK can use `module_ref`. ## Best Practices * Test the function locally in the notebook with `.local(...)` before submitting. * Keep delegated functions deterministic: pass every input explicitly and write outputs to known paths. * Pin critical dependencies in `requirements`. * Use `logs(tail=...)` for progress reporting instead of returning large debug payloads. * Return compact metadata and store large outputs as files. * Use `load_run(...)` to reconnect instead of re-submitting the same expensive run. * Treat notebook `cloudpickle` delegation as an exploratory workflow; move stable production routines into importable modules when they need stronger reproducibility. * Do not place credentials, private endpoints, or long-lived secrets in function closures. Pass secret references or managed paths instead. ## Next Steps Now that you can delegate Python functions to cloud compute: 1. Learn how to [run code in NIKA notebooks](/guides/data-analysis/run-code-in-notebook) 2. Review [supported Python libraries](/guides/data-analysis/supported-python-libraries) 3. Use [custom geoprocess deployment](/guides/custom-geoprocess-deployment/step-by-step) when you need a versioned worker available from GIS tools # Your Second Worker: AI-assisted Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/ai-coder-worker Use AI coding assistants to create, configure, and iterate on GeoEngine workers with sample prompts Instead of manually editing configuration files, you can use AI coding assistants to create and modify GeoEngine workers from natural language prompts. This page provides ready-to-use prompts for popular AI coder tools. Follow the [manual steps](/guides/custom-geoprocess-deployment/step-by-step) first to understand the flow before trying the AI agent route. *** ## Prerequisites * GeoEngine is [installed and logged in](/guides/custom-geoprocess-deployment/installation) * Docker is running * An AI coding assistant of your choice (see supported tools below) ### Supported AI Coder Tools | Tool | Provider | How to Use | | - | - | - | | [Claude Code](https://claude.ai/code) (recommended) | Anthropic | Run from terminal in your script directory | | [Cursor](https://cursor.com) | Cursor | Open your script folder as a project | | [GitHub Copilot](https://github.com/features/copilot) | GitHub / OpenAI | Use in VS Code, JetBrains, or CLI | | [Codex](https://openai.com/codex/) | OpenAI | Run from terminal in your script directory | | [Antigravity IDE](https://antigravity.google) | Google | Open your script folder as workspace | | NIKA local agent tooling | Nika | Use inside your local NIKA workspace | If you have yet to install the skills, follow [Installation & Setup](/guides/custom-geoprocess-deployment/installation#step-3-initialise-ai-agent-skills-optional) to get the skills into your agent. *** ## GeoEngine AI Agent Skills GeoEngine ships with a built-in **AI agent skill** that gives your AI coder structured knowledge of the GeoEngine workflow. If you ran `geoengine setup skills` during [installation](/guides/custom-geoprocess-deployment/installation#step-3-initialise-ai-agent-skills-optional), the following top-level skill is available to your agent: | Skill | Description | | - | - | | `use-geoengine` | Master routing skill that handles GeoEngine requests and loads the right internal workflow, module, reference, or CLI command guide. | Inside `use-geoengine`, the agent can load focused resources only when needed: | Internal resource | What it helps with | | - | - | | `workflows/new-worker.md` | End-to-end worker creation: init, script/config/test edits, lint, dev apply, tests, and final apply. | | `modules/argparse.md` | Adding or repairing Python `argparse` and R `optparse` inputs so GeoEngine can pass `--name value` flags. | | `modules/geoengine-yaml.md` | Writing or updating the `geoengine.yaml` worker contract. | | `modules/pixi-toml.md` | Choosing extra conda-forge dependencies for `pixi.toml`. | | `modules/test-cases.md` | Creating or updating `tests/geoengine.test.yaml` with stable worker tests. | | `references/` | Detailed command, YAML, dependency, test, image, cloud, and maintenance guidance. | With this skill installed, even short prompts like "Make this script a GeoEngine worker" can trigger the full automated workflow. ***
## Step 1: Download the Starter Script Download the starter script and save it in an isolated folder somewhere on your machine — your home directory or Desktop works fine. For this example, we will assume you created a directory in `/Users//Downloads/sg-pgpt-gen`. Place the script into this directory. For this example, we will assume you created a directory in `C:/Users//Downloads/sg-pgpt-gen`. Place the script into this directory. For this example, we will assume you created a directory in `/home//Downloads/sg-pgpt-gen`. Place the script into this directory. *** ## Step 2: Point the Agent to the Directory Allow your AI coder access to the directory that contains your script: * **Claude Code / Codex** — select the script's directory as the workspace * **Cursor / GitHub Copilot** — open the script's directory as a project in the IDE * **Antigravity** — open the script's directory as the workspace in the IDE The AI coder needs to be able to read and write files in that directory to create and edit `geoengine.yaml`, `pixi.toml`, and your script. *** ## Step 3: Creating the Worker Describe your script, its inputs, and its outputs as much as possible. The AI coder will handle the rest — initialising the worker, writing the config files, and building the container. ### Prompt Template ```text theme={null} I have a(n) [Python/R] script called [script-name] in this directory that [describe what the script does]. Make it a GeoEngine worker called [worker-name] with these inputs and outputs: Inputs: - [name]: [type] — [description] - [name]: [type] — [description] Outputs: - [name]: [type] — [description] [Optional: Mention whether you plan to run it from QGIS or ArcGIS Pro.] ``` Available input/output types: `file`, `folder`, `string`, `number`, `boolean`, `enum`, `datetime`. ### Prompt to Use Based on the template, you can use the following prompt in your agent. ```text theme={null} I have an R script called sg_pgpt_gen.R in this directory that generates polygons and points within Singapore. Make it a GeoEngine worker called sg-pgpt-gen with these inputs and outputs: Inputs: - n-polygons: number - number of polygons to generate - n-points: number - number of points to generate - min-sides: number - minimum number of sides per polygon - max-sides: number - maximum number of sides per polygon - seed: number - seed for reproducibility Outputs: - output-folder: folder — directory where the generated GeoJSON file will be saved ``` Add one more line at the end if you plan to run the worker from QGIS or ArcGIS Pro. The agent can remind you to run `geoengine setup plugins`, but individual workers no longer need per-worker plugin flags in `geoengine.yaml`. After the agent is done, ensure the following: * The directory contains all the necessary artifacts. * `tests/geoengine.test.yaml` exists and contains at least one realistic test case. * `geoengine lint`, `geoengine apply --dev`, and `geoengine test` pass. * Running `geoengine workers` shows the worker "sg-pgpt-gen". *** ## Step 4: Verifying in GIS Platform You can now test your worker following the [steps outlined](/guides/custom-geoprocess-deployment/step-by-step#step-8-gis-testing) in the guide. The AI agent should have done a developmental apply, so you will only find the worker with a "latest" version. *** ## Step 5: Saving a Worker Version When you are happy with the worker, run a production apply so that the stable version of the script is saved. Run the following in a terminal that is opened to your worker directory. ```bash theme={null} geoengine lint geoengine test geoengine apply ``` With this, the worker should now have `v1.0.0` applied and readily available for you to use. *** ## Step 6: Improving the Worker Sometimes, you might want to improve on the script. With the help of the AI agent, you can just describe what you want to change. The AI coder will update the script, config files, and dependencies as needed. ### Prompt Template ```text theme={null} I have an existing GeoEngine worker in this directory. [Describe the change you want to make.] ``` ### Example Using the same worker, let's say that we want to manually specify the bounding box rather than using an automatic bounding box approximation of Singapore. Use the following prompt to improve on the worker. ```text theme={null} I have an existing GeoEngine worker in this directory. Make the worker take in a parameter of a GeoJSON file that acts as the bounding box, instead of using the hard-coded bounding box. ``` When the AI is done, run `geoengine test` again and then test the "latest" version of the worker in your GIS plugin. Once you are happy with it, feel free to follow [these steps](/guides/custom-geoprocess-deployment/step-by-step#step-10-push-to-the-cloud) to push the next version to the cloud. Remember to bump the version number before your next `geoengine apply`! *** ## Debugging with AI Coder Here are some prompt templates you can use to debug with your AI coding agent. ### Prompt: Fix a Build Failure ``` My GeoEngine worker failed to build. Here is the error output: [paste the error output from geoengine apply] Please diagnose the issue and fix it. Common causes include missing dependencies in pixi.toml, incorrect pixi.toml syntax, or script import errors. After fixing it, run `geoengine lint`, `geoengine apply --dev`, and `geoengine test`. ``` ### Prompt: Fix a Runtime Error ``` My GeoEngine worker builds successfully but fails when I run it. Here is the error: [paste the error output from geoengine run or the GIS log panel] Please diagnose and fix the issue. Then run `geoengine lint`, `geoengine apply --dev`, and `geoengine test`. ``` ### Prompt: Inspect and Explain a Worker ``` Explain what this GeoEngine worker does. Read the geoengine.yaml, pixi.toml, and the main script in this directory and give me a summary of: - What inputs it accepts - What it does with them - What outputs it produces - What dependencies it needs ``` *** ## Tips for Best Results * **Be specific about inputs and outputs** — mention file types (`.tif`, `.geojson`, `.csv`), whether inputs are read-only or writable outputs, and any optional parameters so the AI sets up `geoengine.yaml` correctly * **Bounce with the agent** — AI agents are not perfect. It is unlikely that the agent will succeed on first try. Paste error logs into the prompt to get the agent to fix, before trying again * **Iterate with `--dev`** — always use `geoengine apply --dev` during development to skip version checks; run `geoengine apply` (without `--dev`) when ready for a production release * **Ask for tests** — have the agent create or update `tests/geoengine.test.yaml`, then keep `geoengine test` in the development loop * **Review generated files** — check that `geoengine.yaml` inputs match your script's argparse arguments * **Mention GIS plugins** — if you need QGIS or ArcGIS Pro support, include that in your prompt (e.g. "enable this for QGIS") # CLI Reference Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/cli-reference Complete reference for all GeoEngine CLI commands, flags, and options All GeoEngine commands follow the form `geoengine [options]`. Run any command with `--help` to see its usage inline. *** ## Global Options These options are accepted by most GeoEngine commands unless a command documents more specific behavior. | Flag | Description | | - | - | | `-v`, `--verbose` | Show more detailed command output on commands that expose the global verbose flag. | | `-y`, `--yes` | Accept confirmation prompts and defaults non-interactively. Useful for setup, init, apply, delete, and push workflows. | For `geoengine test`, use the command-specific long flag `geoengine test --verbose` to show container logs for every case. *** ## Authentication ### `geoengine auth login` Sign in to GeoEngine with your Nika account. Credentials are stored securely on your machine and persist across sessions. Required before worker build, run, registry, and cloud commands. Setup, lint, patch, update, uninstall, and auth commands can run without an active login. ```bash theme={null} geoengine auth login ``` ### `geoengine auth logout` Sign out and remove stored credentials. ```bash theme={null} geoengine auth logout ``` ### `geoengine auth status` Reads logged in user's details. ```bash theme={null} geoengine auth status ``` *** ## Worker Setup ### `geoengine init` Create a new `geoengine.yaml` and `pixi.toml` template in the current directory. It also creates `geoengine.lock`, ensures `.dockerignore` exists, and can scaffold `tests/` and `README.md`. Normal Python/R workers get their generated `Dockerfile` during `geoengine apply`; CUDA init may write a CUDA runtime marker Dockerfile earlier. ```bash theme={null} geoengine init [-n|--name ] [-e|--env py|r|py-cuda|r-cuda] [-y|--yes] ``` | Flag | Description | | - | - | | `-n`, `--name ` | Worker name. Defaults to the current directory name if omitted. | | `-e`, `--env py` | Generate a Python environment template (default). | | `-e`, `--env r` | Generate an R environment template. | | `-e`, `--env py-cuda\|r-cuda` | Generate the environment template for CUDA runtime variants. | | `-y`, `--yes` | Overwrite existing templates when prompted and create the optional `tests/` and `README.md` scaffolds. | *** ### `geoengine apply` Register the worker, save the current config, reconcile the Dockerfile, build the Docker image, and refresh GIS plugin discovery state. ```bash theme={null} geoengine apply [] [--dev] [--no-cache] [--build-arg KEY=VALUE] ``` | Flag | Description | | - | - | | `` | Worker directory path. Defaults to the worker in the current directory. | | `--dev` | Skip semantic version validation and update the mutable `latest` image/config only. | | `--no-cache` | Force a full Docker rebuild, bypassing the layer cache. | | `--build-arg KEY=VALUE` | Pass a custom Docker build argument into the image build. | **What apply does:** 1. Runs the same semantic checks as `geoengine lint` 2. Reconciles `pixi.toml` and the Dockerfile with the current runtime image 3. Builds the Docker image (skipped automatically if config and image are unchanged) 4. Registers the worker if new 5. Saves the current config snapshot and updates `latest` 6. For production applies, records the selected `local_tag` so it can be run, tested, deleted, or pushed later See [Your First Worker: Step-by-Step](/guides/custom-geoprocess-deployment/step-by-step) and [Versioning Workers](/guides/custom-geoprocess-deployment/versioning) for full details. *** ### `geoengine lint` Validate the current directory's `geoengine.yaml` before applying. ```bash theme={null} geoengine lint ``` `geoengine apply` runs this check internally and rejects lint errors. Running `geoengine lint` first gives you the full error list up front. Warnings, such as deprecated fields, do not block apply. *** ## Running Workers ### `geoengine run` Execute a worker in a Docker container. File and folder inputs are auto-mounted, and local run history is recorded by default. ```bash theme={null} geoengine run [] --actor [-i|--input KEY=VALUE ...] [--json] [--tag ] [--no-history] [-- ] ``` | Flag | Description | | - | - | | `` | Worker UUID. Defaults to the worker in the current directory via `geoengine.lock`. | | `--actor ` | Required source label for the run. This is an open string, not an enum. GeoEngine trims whitespace and rejects empty values. | | `-i`, `--input KEY=VALUE` | Pass an input to the worker. Repeat for multiple inputs. File/folder paths are auto-mounted into the container. | | `--json` | Structured output mode: container logs go to stderr, a JSON result is printed to stdout on completion. | | `--tag ` | Run a specific previously-built local tag using its snapshotted config. Defaults to `latest`. | | `--no-history` | Do not persist this run in local history. Use for sensitive, ephemeral, or wrapper-managed runs. | | `-- ` | Pass additional arguments directly to the container command (after the trailing `--`). | Recommended actor values include `CLI`, `QGIS`, `ArcGIS Pro`, `NIKA`, or a properly capitalized agent/app name such as `Codex` or `Field Review App`. Agents and app wrappers should invoke runs as `--actor ""` using proper capitalization. ```bash theme={null} geoengine run --actor CLI --input input-file=/path/to/file.tif geoengine run --actor QGIS --json --input key=value geoengine run --actor "ArcGIS Pro" --json --input key=value ``` **Input mounting:** * `file` inputs are mounted at `/inputs//` * `folder` inputs are mounted at `/mnt/input_/` * Non-path values are passed through as plain string arguments **JSON result format (with `--json`):** ```json theme={null} { "job_id": "01HX4V2Z9B2F4T8H6P9K3N7Q1M", "status": "completed", "exit_code": 0, "files": [ { "name": "output.geojson", "path": "/path/on/host", "size": 1024, "kind": "output" } ] } ``` **Local run history:** By default, every run is recorded under: ```text theme={null} ~/.geoengine/runs/// ``` Each run directory includes: * `record.json` — structured metadata for the run * `logs.ndjson.gz` — compressed streamed stdout/stderr log events `record.json` stores the job ID, worker ID/name, actor, local/requested tag, image tag, start/end time, duration, status, exit code, error, command, inputs, extra args, output files, and log stats. Older records created before actor stamping may show `actor` as `Unknown`. GeoEngine keeps the latest 200 runs per worker and keeps total local history under 1 GiB by default. The current run is always preserved even if it exceeds the cap. History write and prune failures are warnings; they do not fail the worker run. *** ## Frontend Wrapper Integration To run a worker from a frontend wrapper, invoke the CLI with a clear actor label and JSON output: ```bash theme={null} geoengine run --actor "" --json --input key=value ``` Parse stdout as JSON for the structured run result, and treat stderr as live logs/progress. The JSON result includes `job_id`; use it to fetch run details or logs later. To show recent runs: ```bash theme={null} geoengine worker runs list --json --limit 50 ``` To filter by worker: ```bash theme={null} geoengine worker runs list --worker --json ``` To fetch one run: ```bash theme={null} geoengine worker runs show --json ``` To fetch logs: ```bash theme={null} geoengine worker runs logs --stream all geoengine worker runs logs --stream stderr --tail 100 ``` To prune from UI/admin controls: ```bash theme={null} geoengine worker runs prune --keep 200 --max-size-mb 1024 --json ``` *** ## Publishing Workers ### `geoengine push` Publish a previously-applied production worker image to the cloud registry, making it available for team members to run via the QGIS or ArcGIS Pro plugin without a local setup. ```bash theme={null} geoengine push [--id ] [--tag ] [--tenant ] ``` | Flag | Description | | - | - | | `--id ` | Worker UUID to push. Defaults to the worker in the current directory via `geoengine.lock`. | | `--tag ` | Local tag to push. Defaults to the most recently applied production `local_tag`. | | `--tenant ` | Tenant to publish under. Defaults to your owned tenant. | Requires a prior **production** `geoengine apply` (without `--dev`). See [Cloud Push](/guides/custom-geoprocess-deployment/cloud-push) for the full workflow. *** ## Inspecting Workers ### `geoengine workers` List all registered workers. ```bash theme={null} geoengine workers [--all] [--json] ``` | Flag | Description | | - | - | | `--all` | Expand all version sub-rows inline below each worker. | | `--json` | Output as JSON (includes `id`, `name`, `has_tool`, `description`). | **Output columns (default):** `ID`, `NAME`, `LATEST TAG`, `LAST APPLIED` * **LATEST TAG** — most recently applied local tag plus the total number of applied tags, e.g. `claude-1.0.0 (3)` * **LAST APPLIED** — relative time since last apply (e.g. `3 min 42 s ago`) With `--all`, the column header changes to `TAG` — expanding each worker with sub-rows for every applied tag. *** ### `geoengine describe` Show detailed information about a specific worker. ```bash theme={null} geoengine describe [] [--tag ] [--json] ``` | Flag | Description | | - | - | | `` | Worker UUID. Defaults to the worker in the current directory via `geoengine.lock`. | | `--tag ` | Show info for a specific applied tag snapshot instead of the latest. | | `--json` | Output as JSON (includes `name`, `description`, `version`, `inputs`, `applied_at`, `applied_tags`, `config_hash`, `plugins_qgis`, `plugins_arcgis`). | *** ### `geoengine worker runs` List, inspect, stream, and prune local run history. Running `geoengine worker runs` without a subcommand lists recent runs. ```bash theme={null} geoengine worker runs geoengine worker runs list [--worker ] [--limit N] [--json] geoengine worker runs show [--json] geoengine worker runs logs [--stream stdout|stderr|all] [--tail N] geoengine worker runs prune [--worker ] [--keep N] [--max-size-mb M] [--json] ``` | Command | Description | | - | - | | `geoengine worker runs` | List recent runs using the default list view. | | `geoengine worker runs list` | List recent runs. Use `--worker ` to filter, `--limit N` to change the count, and `--json` for structured output. | | `geoengine worker runs show ` | Show the saved `record.json` metadata for one run. | | `geoengine worker runs logs ` | Print saved logs. Use `--stream stdout`, `--stream stderr`, or `--stream all`; use `--tail N` to return only the last N log events. | | `geoengine worker runs prune` | Prune local history. Use `--worker ` to prune one worker, `--keep N` to keep a run count, `--max-size-mb M` to cap total size, and `--json` for a structured summary. | Existing `geoengine workers` and `geoengine describe` remain unchanged for now, though they may later move under `geoengine worker list` and `geoengine worker describe`. *** ### `geoengine diff` Check which tracked files have changed since the last apply. ```bash theme={null} geoengine diff ``` Checks `geoengine.yaml`, the Dockerfile, and build-relevant worker directory files against the last apply. *** ## Managing Workers ### `geoengine delete` Delete a worker or a specific local tag. ```bash theme={null} geoengine delete [--id ] [--tag ] ``` | Flag | Description | | - | - | | `--id ` | Worker UUID to delete. Defaults to the worker in the current directory via `geoengine.lock`. | | `--tag ` | Delete only this local tag (removes its Docker image, map entry, and config snapshot). Omit to delete the entire worker. | Running without `--tag` shows a confirmation prompt before deleting the worker's registration, all saved configs, and all state. *** ## Image Management ### `geoengine image list` List all GeoEngine-managed Docker images. ```bash theme={null} geoengine image list [--filter ] [--all] ``` | Flag | Description | | - | - | | `-f`, `--filter ` | Filter images by image name. | | `-a`, `--all` | Include intermediate layers. | ### `geoengine image import` Import a Docker image from a tarball (useful for air-gapped environments). ```bash theme={null} geoengine image import [--tag ] ``` | Flag | Description | | - | - | | `-t`, `--tag ` | Apply a tag to the imported image. Optional. | ### `geoengine image remove` Remove a Docker image and its associated version entry and config snapshot. ```bash theme={null} geoengine image remove [--force] ``` | Flag | Description | | - | - | | `-f`, `--force` | Force removal even if containers are using the image. | *** ## Environment Variables Global environment variables are injected into every worker container at runtime. ### `geoengine env set` Set one or more global environment variables. ```bash theme={null} geoengine env set KEY=value geoengine env set KEY="value with spaces" geoengine env set KEY1=val1 KEY2=val2 geoengine env set -f path/to/.env # Load from a .env file ``` Inline variables override file variables if both are provided in the same command. ### `geoengine env unset` Remove one or more global environment variables. ```bash theme={null} geoengine env unset KEY geoengine env unset KEY1 KEY2 ``` ### `geoengine env list` List all currently set global environment variables. ```bash theme={null} geoengine env list ``` ### `geoengine env show` Show the value of a single global environment variable. ```bash theme={null} geoengine env show KEY ``` *** ## Worker Tests ### `geoengine test` Run declarative tests from `tests/geoengine.test.yaml`. ```bash theme={null} geoengine test [] [--case ] [--tag ] [--json] [--keep-workdir] [--verbose] ``` | Flag | Description | | - | - | | `` | Worker directory path or worker UUID. Defaults to the current directory's worker. | | `--case ` | Run one named test case. | | `--tag ` | Test a specific previously applied local tag. | | `--json` | Output the test report as JSON. | | `--keep-workdir` | Keep `.geoengine-test/` case folders for inspection. | | `--verbose` | Show container logs for every test, not only failures. | Read-only fixture paths are resolved relative to `tests/`. Output file/folder inputs are resolved inside `.geoengine-test//`. See [Designing Worker Tests](/guides/custom-geoprocess-deployment/test-designing) for the manifest schema and examples. *** ## Maintenance & Updates ### `geoengine setup` Initial installation for GeoEngine add-ons. Includes skills and GIS plugins. ```bash theme={null} geoengine setup skills [--agent ] geoengine setup plugins [--qgis] [--arcgis] [--all] ``` | Command | Description | | - | - | | `geoengine setup skills` | Install GeoEngine skills for one or more supported AI agents. | | `geoengine setup skills --agent Codex` | Install skills for one named agent. Supported names include `Claude`, `Codex`, `Antigravity`, `Cursor`, `Copilot`, and `NIKA`. | | `geoengine setup plugins --qgis` | Install the QGIS plugin. | | `geoengine setup plugins --arcgis` | Install the ArcGIS Pro toolbox. Windows only. | | `geoengine setup plugins --all` | Install all platform-supported GIS plugins. | ### `geoengine patch` Validate all GeoEngine artifacts and repair anything that is broken or out of date. Safe to run at any time; exits with a non-zero status if issues are found. ```bash theme={null} geoengine patch ``` Run this after upgrading GeoEngine to sync workers, GIS plugins, and agent skills with the new binary. `geoengine patch --init` remains as a deprecated compatibility alias for `geoengine setup skills`. ### `geoengine update` Update GeoEngine to the latest version using the original install method (Homebrew, curl, or PowerShell), then automatically run `geoengine patch`. ```bash theme={null} geoengine update ``` ### `geoengine uninstall` Remove the GeoEngine binary and GeoEngine files. ```bash theme={null} geoengine uninstall ``` *** ## Quick Reference | Command | Description | | - | - | | `geoengine auth login\|logout\|status` | Authentication-related commands, to login, logout, and see user details | | `geoengine init [--name] [--env py\|r\|py-cuda\|r-cuda]` | Create GeoEngine worker templates and optional test scaffolds | | `geoengine apply [--dev] [--no-cache] [--build-arg K=V]` | Register the worker, save config, and build/update the image | | `geoengine lint` | Validate `geoengine.yaml` semantic rules | | `geoengine test [--case C] [--tag T] [--json] [--keep-workdir] [--verbose]` | Run worker test cases | | `geoengine push [--id ] [--tag T] [--tenant T]` | Publish a production image to the cloud registry | | `geoengine run [] --actor --input K=V [--json] [--tag T] [--no-history]` | Run a worker in a container and record local history | | `geoengine diff` | Check tracked file changes since last apply | | `geoengine workers [--all] [--json]` | List registered workers | | `geoengine describe [] [--tag T] [--json]` | Show worker details and config hash | | `geoengine worker runs list\|show\|logs\|prune` | Inspect and manage local run history | | `geoengine delete [--id ] [--tag T]` | Delete a worker or a single tag | | `geoengine image list\|import\|remove` | Manage Docker images | | `geoengine env set\|unset\|list\|show` | Manage global environment variables | | `geoengine setup skills\|plugins` | Install local agent skills or GIS plugins | | `geoengine patch` | Repair artifacts and sync plugins/agent skills | | `geoengine update` | Update to latest version, then run patch | | `geoengine uninstall` | Remove GeoEngine binary and data | # Cloud Push Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/cloud-push Push your GeoEngine worker to the cloud so your whole team can run it without a local setup `geoengine push` publishes a previously-applied production worker image to Nika's cloud registry. Once pushed, team members can run the worker directly from their QGIS or ArcGIS Pro plugin — without needing Docker, a terminal, or a local GeoEngine setup. *** ## Prerequisites * GeoEngine installed and authenticated (`geoengine auth login`) * A production apply completed: `geoengine apply` (without `--dev`) — dev builds cannot be pushed * Recommended: local checks pass with `geoengine lint` and `geoengine test` *** ## Workflow ### Step 1: Apply in Production Mode From your worker directory, bump the version in `geoengine.yaml` if needed, then run the local checks: ```bash theme={null} geoengine lint geoengine test ``` Then run a production apply: ```bash theme={null} geoengine apply ``` This builds a versioned image and saves a config snapshot. Dev builds (`--dev`) are not eligible for push. ### Step 2: Push to the Cloud ```bash theme={null} geoengine push [--id ] [--tag ] [--tenant ] ``` | Flag | Description | | - | - | | `--id ` | Worker UUID to push. Defaults to the worker in the current directory via `geoengine.lock`. | | `--tag ` | Local tag to push. Defaults to the most recently applied production `local_tag`. | | `--tenant ` | Tenant to publish under. Defaults to your owned tenant, or prompts when more than one tenant is available. | Run from your worker directory without any flags to push the latest production version: ```bash theme={null} geoengine push ``` GeoEngine confirms the local tag and semantic version, uploads the container image to the cloud registry, and registers it in the selected workspace. ### Step 3: Available to Your Team After a successful push, team members will see the worker in their QGIS or ArcGIS Pro GeoEngine plugin and can run it through the cloud without installing anything locally. *** ## Notes * Only production images (from `geoengine apply` without `--dev`) can be pushed. If you've only run `geoengine apply --dev`, run `geoengine apply` first. * If `local_tag` is not set in `geoengine.yaml`, production apply prompts to use the semantic `version` as the local tag. * If you have access to multiple tenants, use `--tenant` to target a specific one. * Use `geoengine workers` to see the current applied tag for each worker (`LATEST TAG` column). # Debug & Troubleshoot Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/debugging Diagnose worker issues using GeoEngine's CLI inspection commands and log output GeoEngine provides a set of CLI commands to inspect workers, read container logs, and repair broken state. This guide covers the most common debugging scenarios. *** ## Check What Has Changed Before re-applying a worker, use `geoengine diff` to see which tracked files have changed since the last apply: ```bash theme={null} # Check tracked files: geoengine.yaml, Dockerfile, and build-relevant worker files geoengine diff ``` This is useful for confirming which changes will be picked up when you run `geoengine apply` next. *** ## Inspect Registered Workers List all registered workers and their current status: ```bash theme={null} # Summary view geoengine workers # Expanded view — shows all versions as sub-rows beneath each worker geoengine workers --all ``` The output table includes the following columns: | Column | Description | | - | - | | **ID** | Worker UUID used by the CLI and Docker tags | | **NAME** | Worker name | | **LATEST TAG** | Most recently applied local tag plus the total number of applied tags, e.g. `claude-1.0.0 (3)` | | **LAST APPLIED** | Relative time since last apply (e.g. `3 min 42 s ago`) | If a worker is missing from this list after `geoengine apply`, run `geoengine patch` to repair the worker registry (see below). *** ## Inspect a Specific Worker Get detailed information about a single worker: ```bash theme={null} # Show the latest applied version, config hash, and available versions list geoengine describe # Show info for a specific previously-built tag geoengine describe --tag claude-1.0.0 ``` The output includes: * **Name and description** * **Version** and **applied at** timestamp * **Config hash** — a SHA-256 of the applied config; useful to confirm two builds used the same configuration * **Applied tags** — all local tags currently on disk for this worker * **Runtime image** — the base runtime image used when the tag was applied, when available *** ## Read Container Logs Container logs stream to **stderr** automatically when you run a worker. To separate logs from the structured result, use `--json` mode: ```bash theme={null} geoengine run --actor CLI --json --input input-file=/path/to/file.tif ``` * **stderr** — container log output, streamed in real time * **stdout** — the final JSON result, printed on completion: ```json theme={null} { "job_id": "01HX4V2Z9B2F4T8H6P9K3N7Q1M", "status": "completed", "exit_code": 0, "files": [ { "name": "output.geojson", "path": "/path/to/output/file", "size": 1024, "kind": "output" } ] } ``` A non-zero `exit_code` means the container script exited with an error. Check stderr for the Python/R traceback. *** ## Inspect Run History Every `geoengine run` is saved locally by default, with metadata and compressed streamed logs under `~/.geoengine/runs///`. Use the `job_id` from the JSON result to inspect the run later: ```bash theme={null} geoengine worker runs show --json geoengine worker runs logs --stream stderr --tail 100 ``` Use `geoengine run --no-history` for sensitive or ephemeral runs that should not be written to local history. *** ## Debug Worker Tests If `geoengine test` fails, rerun the failing case with logs and keep the output folder: ```bash theme={null} geoengine test --case --verbose --keep-workdir ``` Inspect `.geoengine-test//` to confirm what the worker actually wrote. If the output is correct but the comparison failed, update the expected file, tolerance, or ignored JSON paths in `tests/geoengine.test.yaml`. *** ## Force a Clean Rebuild If your Docker image is stale or a dependency change isn't being picked up, force a full rebuild with `--no-cache`: ```bash theme={null} geoengine apply --no-cache ``` This bypasses Docker's layer cache and rebuilds the image from scratch. Use it when: * You've updated a package version in `pixi.toml` but the old version is still being used * The image is in an inconsistent state after a failed build * You want to confirm the image builds cleanly from the current config *** ## Repair GeoEngine Artifacts `geoengine patch` performs a maintenance sweep and repairs any broken state across all GeoEngine-managed artifacts: ```bash theme={null} geoengine patch ``` Run this after upgrading GeoEngine, or whenever workers, plugins, or agent skills are behaving unexpectedly. It checks and repairs: * **Global registry** (`~/.geoengine/settings.bin`) — validates the settings file * **Worker state files** — validates `state/*.json`, reports orphaned records * **Config snapshots** — validates `saves//map.json`, checks all referenced snapshots exist * **GIS plugins** — reinstalls stale or missing plugin files for QGIS and ArcGIS Pro * **Agent skills** — syncs skill files into each installed agent's skills folder; files with matching SHA-256 hashes are skipped `geoengine patch` exits with a non-zero status if any validation issue is found, making it safe to use in scripts. *** ## Delete a Worker or Version If a worker is in a broken state and needs to be removed: ```bash theme={null} # Delete a worker entirely by ID (shows a confirmation prompt) geoengine delete --id # Delete the worker in the current directory geoengine delete # Delete a specific tag only (removes image, mapping, and snapshot) geoengine delete --tag claude-1.0.0 ``` After deleting, re-apply the worker with `geoengine apply` to recreate it cleanly. *** ## Common Issues ### Build fails: `command.script` not found Make sure the `script` path in `geoengine.yaml` is relative to the worker directory and the file actually exists there. ### `geoengine apply` rejects my version number In production mode, the version in `geoengine.yaml` must be a valid semantic version (`MAJOR.MINOR.PATCH`) and must be greater than or equal to the highest version already recorded. Use `geoengine apply --dev` to skip this check during development. ### Worker appears in `geoengine workers` but not in QGIS/ArcGIS Run `geoengine patch` to reinstall any stale plugin files, then close and reopen the GIS Processing Toolbox to refresh the worker list. ### Dependency changes not reflected after apply Run `geoengine apply --no-cache` to force a full Docker rebuild. Docker may be using a cached layer that predates your `pixi.toml` changes. # Installation & Setup Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/installation Install GeoEngine, set up prerequisites, initialise AI agent skills, and configure GIS plugins Get GeoEngine installed and ready to use on your machine. This guide walks you through installing Docker, the GeoEngine CLI, logging in, and optionally setting up AI agent skills and GIS plugin support. ## Prerequisites Before installing GeoEngine, make sure you have the following: ### Required * **[Docker](https://docs.docker.com/get-docker/)** — GeoEngine runs all workers in Docker containers. Install Docker Desktop (macOS/Windows) or Docker Engine (Linux) and ensure it is running before using any GeoEngine commands. ### Optional * **GIS Platform(s)** — Install one or both if you want to run workers directly from your GIS software: * [QGIS](https://qgis.org) (open source) * [ArcGIS Pro](https://pro.arcgis.com/en/pro-app/latest/get-started/download-arcgis-pro.htm) * **AI Agent(s)** — Install one or more if you want to use AI to create and manage workers automatically: * [Claude Code](https://claude.ai/code) by Anthropic (recommended) * [Cursor](https://cursor.com) by Cursor AI * [GitHub Copilot](https://github.com/features/copilot) by VS Code / Microsoft * [Codex](https://openai.com/codex/) by OpenAI * [Antigravity](https://antigravity.google) by Google * NIKA local agent tooling, if your organisation uses it ***
## Step 1: Install GeoEngine Choose the installation method that matches your platform: **Homebrew (recommended)** ```bash theme={null} brew tap NikaGeospatial/geoengine brew install geoengine ``` **Shell script (alternative)** ```bash theme={null} curl -fsSL https://raw.githubusercontent.com/NikaGeospatial/geoengine/main/install/install.sh | bash ``` Open **PowerShell as Administrator** and run: ```powershell theme={null} irm https://raw.githubusercontent.com/NikaGeospatial/geoengine/main/install/install.ps1 | iex ``` ```bash theme={null} curl -fsSL https://raw.githubusercontent.com/NikaGeospatial/geoengine/main/install/install.sh | bash ``` This also works in WSL2 on Windows. ### Offline / Air-Gapped Installation If your machine has no internet access, copy the `geoengine` binary to the target machine first, then run: ```bash theme={null} ./install.sh --local ./geoengine ``` *** ## Setup Troubleshooting **Xcode Command Line Tools Error** GeoEngine itself does not depend on Xcode — it runs workers inside Docker containers. However, **Homebrew** (the macOS package manager used to install the GeoEngine CLI) requires the Xcode Command Line Tools to compile and link packages during installation. Without a compatible version of Xcode or its Command Line Tools, Homebrew cannot build the dependencies it needs, and the `brew install geoengine` step will fail. If you see errors related to **Xcode** or **Xcode Command Line Tools** when using Homebrew — such as: ``` Error: Your Xcode (14.0) is too outdated. ``` ``` Error: Xcode alone is not sufficient on Catalina/Big Sur/Monterey/Ventura/Sonoma/Sequoia. ``` ``` xcode-select: error: command line tools are already installed, use "Software Update" to install updates ``` You need to install or update Xcode before proceeding: 1. Visit the [Apple Developer Downloads](https://developer.apple.com/download/all/) page 2. Sign in with your Apple ID 3. Search for the latest version of **Xcode** compatible with your macOS version 4. Download and install it 5. After installation, open a terminal and run: ```bash theme={null} sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer sudo xcodebuild -runFirstLaunch ``` 6. Then retry the Homebrew installation: ```bash theme={null} brew tap NikaGeospatial/geoengine brew install geoengine ``` If you only need the **Command Line Tools** (without the full Xcode IDE), you can install them with `xcode-select --install`. However, some Homebrew formulae require the full Xcode application. No platform-specific issues are common at this stage. If you encounter problems, check that: * PowerShell was run **as Administrator** * **Docker Desktop** is installed and running * Your Windows version supports WSL2 (Windows 10 version 2004+ or Windows 11) No platform-specific issues are common at this stage. If you encounter problems, check that: * **Docker Engine** is installed and the `docker` command is available * Your user is in the `docker` group (so you can run `docker` without `sudo`): ```bash theme={null} sudo usermod -aG docker $USER ``` Log out and back in after running this command. *** ## Step 2: Log In GeoEngine requires a free Nika account. Run the login command before using worker build, run, registry, and cloud commands: ```bash theme={null} geoengine auth login ``` This will open a browser window where you can authorise GeoEngine with your Nika account. If the browser does not open automatically, the terminal will display a URL — hold **Cmd** (macOS) or **Ctrl** (Windows/Linux) and click the URL to open it manually. GeoEngine OAuth login screen Click **Authorize** to complete the login. Your credentials are stored securely on your machine after the first login. You only need to run `geoengine auth login` again if your credentials expire or become corrupted. Commands such as `geoengine setup`, `geoengine lint`, `geoengine patch`, `geoengine update`, and `geoengine uninstall` do not require login, but worker commands like `geoengine apply`, `geoengine run`, `geoengine workers`, and `geoengine push` will prompt you to log in if your session is missing. *** ## Step 3: Initialise AI Agent Skills (Optional) If you have an AI agent installed, run the following to install the GeoEngine skill bundle into your agent: ```bash theme={null} geoengine setup skills ``` You will be prompted to select which agent(s) to install skills for: * **Claude** (Anthropic) — recommended * **Cursor** (Cursor AI) * **GitHub Copilot** (VS Code / Microsoft) * **Codex** (OpenAI) * **Antigravity** (Google) * **NIKA** (local NIKA tooling) GeoEngine currently installs one top-level skill, `use-geoengine`. That skill contains the internal workflow guidance, references, and templates needed for worker creation, YAML updates, dependency updates, tests, cloud push, and maintenance commands. Skills that are already up to date are skipped; changed or missing files are installed automatically. To install skills for one agent non-interactively, pass `--agent`: ```bash theme={null} geoengine setup skills --agent Codex ``` ### Verify Skills Are Working After installing, open your AI agent and run the following prompt: ``` What skills do you have? ``` If the agent lists the GeoEngine skill (`use-geoengine`), the installation was successful. If the agent does not mention the GeoEngine skill in its response, try prompting more specifically: ``` Do you have any GeoEngine-related skills installed? ``` If the agent still does not recognise the skill, check that the skill files are in the correct agent folder (e.g. `~/.claude/skills` for Claude Code) and restart your agent. See [Create & Modify a Worker Using AI Coder](/guides/custom-geoprocess-deployment/ai-coder-worker) for the full workflow. *** ## GIS Plugin Installation (If Using QGIS or ArcGIS Pro) This step is only required if you plan to run GeoEngine workers from **QGIS** or **ArcGIS Pro**. If you only use the CLI or AI agents to run workers, you can skip this step entirely. Install the local GIS plugin once with: ```bash theme={null} geoengine setup plugins ``` You can also install a specific plugin non-interactively: ```bash theme={null} geoengine setup plugins --qgis geoengine setup plugins --arcgis # Windows only geoengine setup plugins --all ``` After the plugin is installed, applied workers are discovered from your local GeoEngine registry. You no longer need to enable individual workers with a `plugins:` section in `geoengine.yaml`. If you upgrade GeoEngine later, run `geoengine patch` to bring all plugins back in sync: ```bash theme={null} geoengine patch ``` *** ## Next Steps You are now ready to start using GeoEngine! Follow the [step-by-step guide](/guides/custom-geoprocess-deployment/step-by-step) to create your first worker! *** ## Enabling GIS Plugin This section will only apply after you have done the `geoengine setup plugins` step. It is included for your information, but not part of GeoEngine's core installation.
You can install QGIS from the [QGIS website](https://qgis.org). Enabling QGIS Plugin 1. Run `geoengine setup plugins --qgis`, or select QGIS from the interactive plugin menu. 2. Open QGIS and in the top bar, click **Plugins** > **Manage and Install Plugins...** 3. Navigate to the **Installed** tab and enable the **GeoEngine** plugin 4. GeoEngine will now be available in the **Processing** menu See [Running Workers in ArcGIS Pro & QGIS](/guides/custom-geoprocess-deployment/running-in-gis) for how to use the plugins once installed. You can install ArcGIS Pro from the [ArcGIS website](https://pro.arcgis.com/en/pro-app/latest/get-started/download-arcgis-pro.htm). 1. Run `geoengine setup plugins --arcgis`, or select ArcGIS from the interactive plugin menu. 2. GeoEngine prints the path to `GeoEngineTools.pyt`. 3. In ArcGIS Pro, navigate to the **Catalog** pane and right-click **Toolboxes** > **Add Toolbox**. 4. Select the printed `GeoEngineTools.pyt` path and click **OK**. 5. **GeoEngine Tools** should now be available in your Toolboxes. See [Running Workers in ArcGIS Pro & QGIS](/guides/custom-geoprocess-deployment/running-in-gis) for how to use the plugins once installed. ArcGIS Pro is not supported on . ArcGIS Pro is not supported on . # Maintain GeoEngine Files Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/maintenance Handle GeoEngine versioning, updates, and patches, as well as common maintenance issues you may encounter. ## Updating GeoEngine To update to the latest version, run: ```bash theme={null} geoengine update ``` GeoEngine detects how it was originally installed (Homebrew, curl, or PowerShell) and upgrades using the same method. After the binary is updated, it automatically runs `geoengine patch` to bring all workers, GIS plugins, and agent skills in sync with the new version. A typical update looks like this: ``` Detected install method: Homebrew ==> brew update ==> brew upgrade geoengine ==> Upgrading nikageospatial/geoengine/geoengine 0.6.1 -> 0.6.4 ==> Summary 🍺 /opt/homebrew/Cellar/geoengine/0.6.4: 4 files, 10.2MB, built in 1 second GeoEngine updated via Homebrew Running geoengine patch... Checking global artifacts... ✓ settings.bin Checking GIS plugins... ✓ QGIS plugin reinstalled (files were stale) • ArcGIS not installed on this machine — skipping Checking agent skills... ✓ Claude skills up-to-date ✓ Codex skills up-to-date ✓ Antigravity skills up-to-date Patch complete: 0 workers checked, 1 plugin updated, 0 skills synced, 0 migrations applied, 0 issues found. ... ``` If the patch step reports that a GIS plugin was updated, restart QGIS or ArcGIS Pro to load the latest plugin version. ## Patching GeoEngine Sometimes, you might want to check on the integrity of GeoEngine artifacts. To do so, run: ```bash theme={null} geoengine patch ``` GeoEngine checks the integrity of all artifacts and reports any issues it finds. ### Common Issues | Issue | Solution | | - | - | | Stale config files found | Run `geoengine delete` and `geoengine apply` again to reset worker cache. | | Missing GIS plugins | Run `geoengine setup plugins`, then restart QGIS or re-add the ArcGIS toolbox. | # Run Workers in ArcGIS Pro or QGIS Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/running-in-gis Find and run your GeoEngine workers directly inside ArcGIS Pro and QGIS after applying them After you have installed the GIS plugin and applied a GeoEngine worker, it appears as a native tool inside your GIS software — no proxy service, no per-worker plugin configuration. This guide shows you how to find and run your workers from QGIS and ArcGIS Pro. If you haven't applied a worker yet, see [Your First Worker: Step-by-Step](/guides/custom-geoprocess-deployment/step-by-step) first. *** ## Running in QGIS ### Step 1: Open the Processing Toolbox In QGIS, open the **Processing** menu and click **Toolbox**, or press `Ctrl+Alt+T` (`⌥+⌘+T` on Mac). The Processing Toolbox panel will appear on the right side of the screen. ### Step 2: Find Your Worker Expand the **GeoEngine** provider in the toolbox. Your workers are listed by name. Each worker shows a **`my-worker (*latest)`** entry, plus one entry for each applied production local tag (for example `my-worker (1.0.0)` or `my-worker (release-candidate)`). Click on any entry to see its description, config hash, and last-applied time in the help panel on the right. ### Step 3: Fill In Inputs and Run Double-click a worker entry to open the tool dialog. Fill in the required input parameters: * **File inputs** — use the file selector to browse to a file on your machine; GeoEngine mounts it automatically * **Folder inputs** — select a directory * **Other inputs** (enum, number, boolean, string) — displayed as dropdowns, number fields, checkboxes, or text fields Click **Run**. Container logs stream into the QGIS log panel in real time. When the run finishes, output files are automatically added as layers to your QGIS project. Local QGIS executions are stamped in GeoEngine run history with `--actor QGIS`. *** ## Running in ArcGIS Pro ### Step 1: Open the GeoEngine Toolbox In ArcGIS Pro, open the **Analysis** tab and click **Tools** to open the Geoprocessing pane. Search for **GeoEngine** in the search bar, or browse to the GeoEngine toolbox in the **Toolboxes** section of the Catalog pane. ### Step 2: Find Your Worker Expand the GeoEngine toolbox. Your applied workers appear as tool entries. The latest entry uses the worker name; tagged production entries include the local tag in brackets, for example `my-worker [1.0.0]`. Click a tool to see its description and parameters. ### Step 3: Fill In Inputs and Run Double-click a worker to open its tool dialog. Fill in the required parameters and click **Run**. Container logs appear in the Geoprocessing history and messages panel. Output files are added to your ArcGIS Pro map automatically when the run completes. Local ArcGIS Pro executions are stamped in GeoEngine run history with `--actor "ArcGIS Pro"`. *** ## Understanding Output When a worker finishes, GeoEngine returns a structured JSON result: ```json theme={null} { "job_id": "01HX4V2Z9B2F4T8H6P9K3N7Q1M", "status": "completed", "exit_code": 0, "files": [ { "name": "output.geojson", "path": "/path/to/output/file", "size": 123, "kind": "output" } ] } ``` * **`job_id`** — the saved run ID; use it with `geoengine worker runs show` or `geoengine worker runs logs` when inspecting local run history * **`kind: "output"`** — a file produced by the worker; automatically added to your GIS view * **`kind: "input"`** — an input file that was passed in; also shown in the GIS so you can compare input and output side by side If a run fails, the exit code and any error messages from the container appear in the GIS messages panel. *** ## Cancelling a Run You can cancel a running worker at any time using the cancel button in the GIS progress dialog. Cancellation terminates the GeoEngine subprocess, which in turn stops and removes the Docker container immediately. *** ## Refreshing the Worker List The plugin reads the worker list fresh each time the toolbox is opened. If you apply a new worker or a new version and it doesn't appear in your GIS yet, close and reopen the Processing Toolbox (QGIS) or Geoprocessing pane (ArcGIS Pro) to trigger a refresh. # Your First Worker: Step-by-Step Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/step-by-step Download a ready-made GeoEngine worker, apply it locally, and push it to the cloud — all in a few commands. This guide walks you through deploying your first GeoEngine worker from start to finish. Every command is ready to copy and paste — just follow the steps in order. A couple of surprises are built in along the way, so don't skip ahead. This guide assumes you have already installed GeoEngine and logged in. If you haven't, complete the [Installation & Setup](/guides/custom-geoprocess-deployment/installation) guide first. *** ## Introduction We will be deploying a simple geoprocessing worker that creates a grid around a vector input. The script is written in Python. ***
## Step 1 — Download the Starter Script Download the starter worker script and save it in an isolated folder somewhere on your machine — your home directory or Desktop works fine. For this example, we will assume you created a directory in `/Users//Downloads/grid-creator`. Place the script into this directory. For this example, we will assume you created a directory in `C:/Users//Downloads/grid-creator`. Place the script into this directory. For this example, we will assume you created a directory in `/home//Downloads/grid-creator`. Place the script into this directory. You should now have a folder called `grid-creator` in your current directory. *** ## Step 2 — Navigate Into the Directory ```bash theme={null} cd ~/Downloads/grid-creator ``` All GeoEngine commands from here on must be run from inside this folder. *** ## Step 3 - Initialise the Worker First, you have to generate the worker artifact templates. Run the following in the same terminal. ```bash theme={null} geoengine init --env py ``` Here, we specify the `--env` flag to create a Python-centric dependencies template. If you were to use an R script, use `--env r` instead. When GeoEngine asks whether to create a `tests/` folder, choose **Yes**. If you skipped it, the testing step below shows the exact files to create. *** ## Step 4 — Inspect the Files Take a moment to look at what's inside before running anything: ### Main Script * **`grid_creation.py`** — the Python script that does the actual geoprocessing work ### GeoEngine Worker Configurations The following files can be edited to customize the worker: * **`pixi.toml`** — declares all the Python/conda dependencies GeoEngine will install into the Docker container * **`geoengine.yaml`** — the worker configuration: its name, version, local tag, command, and inputs ### GeoEngine Worker Build Artifacts The following files are automatically generated by GeoEngine, and should not be edited unless you know what you're doing: * **`.dockerignore`** — tells Docker which files to ignore when building the image * **`geoengine.lock`** - the ID of the worker (do not touch this) * **`tests/`** — local worker test scaffold, if you chose to create it during init The **`Dockerfile`** is generated during `geoengine apply` for normal Python/R workers. Once it exists, treat it as a GeoEngine-managed build artifact. *** ## Step 5 - Wire up the Script Ensure that your script has an argparser set up. If you look at the script, you will notice it is already done. So now, we just need to wire up the config files to match the script. ### Add Dependencies Open up `pixi.toml` in an editor of your choice. Here, you can edit the `[workspace]` section if you wish. This will not be reflected anywhere, but is just a mere requirement of Pixi. You will notice an empty `[dependencies]` section. The GeoEngine runtime image already includes common geospatial packages such as GDAL, pandas, NumPy, GeoPandas, and Shapely, which are sufficient for this script. If your own worker needs extra conda-forge packages, add only those extras here. ### Edit the Config File Open up `geoengine.yaml` in an editor of your choice. Here, you will define the worker's details: its name, description, local tag, command, and input parameters. * The template creates the worker `name` based on your directory folder, but feel free to change it as you wish. * The `version` field is the cloud-facing semantic version. For now you can leave it at `1.0.0`. * The `local_tag` field labels this local production build. Use it to provide short but informative information about the local version. * The `description` field will be write-up on your worker's workings. Optional, but good to have. * The `command` section details out the running requirements of your worker. The inputs should match the arguments set up in the argparser in your script. * Inputs marked with `output: true` are writable output paths. Other file and folder inputs are mounted read-only. For this example, copy and paste the below configuration wholesale into the `geoengine.yaml`. ```yaml theme={null} name: grid-creator version: "1.0.0" local_tag: "my-first-tag" description: Create square, rectangle, or diamond grids from an input vector extent command: program: python script: grid_creation.py inputs: - name: input-file type: file required: true description: Input vector file used to derive the grid extent - name: grid-type type: enum required: false default: square description: Grid geometry type enum_values: - square - rectangle - diamond - name: cell-width type: number required: true description: Grid cell width in CRS units (or meters when auto-reproject is true) - name: cell-height type: number required: false description: Grid cell height for rectangle grids (optional for square/diamond) - name: output-file type: string required: false default: regular_grid description: Output file name without extension (GeoJSON will be written) - name: output-dir type: folder required: true description: Output folder for the generated GeoJSON grid output: true - name: auto-reproject type: boolean required: false default: true description: Auto-reproject geographic CRS inputs to UTM while generating the grid - name: add-id type: boolean required: false default: true description: Add a grid_id column to the output ``` *** ## Step 6 — Apply the Worker Locally First, run the semantic config checks: ```bash theme={null} geoengine lint ``` Then build and apply the worker in development mode: ```bash theme={null} geoengine apply --dev ``` GeoEngine will resolve dependencies, build the Docker image, and register the worker on your machine. The first apply takes the longest — pixi is downloading and locking all the packages declared in `pixi.toml`. The first `geoengine apply --dev` can take several minutes while pixi installs dependencies into the Docker image. Subsequent applies are much faster because the image layers are cached. This is completely normal — let it run. When it finishes, you should see output like this: ``` => Building worker 'grid-creator'... ✓ Successfully built image: geoengine-local/:latest ✓ Registered worker 'grid-creator' ✓ Apply complete for worker 'grid-creator' ``` The worker is now built and registered! You can check details of the worker by running while still in the `grid-creator` directory: ```bash theme={null} geoengine describe ``` *** ## Step 7 — Add a First Worker Test Before opening GIS, add a tiny local contract test. This gives you a repeatable way to prove the worker still builds a grid after future edits. If `tests/fixtures/` does not exist yet, create it. Then add a file at `tests/fixtures/small_extent.geojson`: ```json theme={null} { "type": "FeatureCollection", "name": "small_extent", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [0.0, 0.0], [0.0, 0.002], [0.002, 0.002], [0.002, 0.0], [0.0, 0.0] ] ] } } ] } ``` Now replace `tests/geoengine.test.yaml` with this first smoke test: ```yaml theme={null} version: 1 cases: - name: square-grid-smoke inputs: input-file: fixtures/small_extent.geojson grid-type: square cell-width: 0.001 output-file: square_grid output-dir: outputs auto-reproject: false add-id: true expect: exit_code: 0 files: - path: outputs/square_grid.geojson exists: true min_size: 1 extension: .geojson ``` Run the test: ```bash theme={null} geoengine test ``` GeoEngine runs the applied worker through the same runtime path as `geoengine run --actor CLI --json`. The fixture path is resolved from `tests/`, and the output path is created under `.geoengine-test/square-grid-smoke/`. Use `geoengine test --keep-workdir` if you want to inspect the generated output folder after the run. *** ## Step 8 — GIS Testing
If you want to run this worker from QGIS or ArcGIS Pro, install the local GIS plugin once: ```bash theme={null} geoengine setup plugins ``` After the plugin is installed, it discovers applied workers from the local GeoEngine registry. ### Enable the Plugin in QGIS After `geoengine setup plugins --qgis` installs the plugin, enable it inside QGIS once: 1. In the QGIS top bar, click **Plugins** > **Manage and Install Plugins...** 2. Go to the **Installed** tab 3. Find **GeoEngine** in the list and check the box next to it 4. Close the dialog You only need to enable the plugin once. Future applies and updates will not require you to do this again. ### Processing Toolbox The GeoEngine plugin should now be available in the **Processing Toolbox**. Open it from the top bar **Processing > Toolbox**. Alternatively, you can use the short cut `⌥`+`⌘`+`T`. Alternatively, you can use the short cut `Ctrl`+`Alt`+`T`. Alternatively, you can use the short cut `Ctrl`+`Alt`+`T`. ### Enable the Plugin in ArcGIS Pro After `geoengine setup plugins --arcgis` installs the toolbox, add it inside each ArcGIS Pro project: 1. Copy the `GeoEngineTools.pyt` path printed by `geoengine setup plugins --arcgis` 2. In ArcGIS Pro, navigate to the **Catalog** pane and right-click **Toolboxes** > **Add Toolbox** 3. Paste the path reference to the plugin in the file dialog and click **OK** 4. **GeoEngine Tools** should now be available in your Toolboxes You need to add the GeoEngine toolbox once per ArcGIS Pro project. ### Processing Toolbox The GeoEngine plugin should now be available as a Toolbox. Go on to **Catalog** to check it out. If the worker list looks stale, right-click the `GeoEngineTools.pyt` toolbox and click **Refresh Toolbox**. ArcGIS Pro is not supported on . ArcGIS Pro is not supported on . *** ## Step 9 — Run the Worker from GIS In the **Processing Toolbox**, expand **GeoEngine** and find **grid-creator (\*latest)**. Double-click it to open the tool dialog. Load a vector layer as the **Input Layer** — any polygon or line layer you have on hand works for a first test run. You can even load in a vector file. Click **Run**. GeoEngine executes the script inside the Docker container and streams the output back to QGIS. When it finishes, a result layer will appear in your **Layers** panel and render on the map canvas. If the tool dialog does not appear or the worker shows an error, check the **GeoEngine Log** panel (View > Panels > GeoEngine Log) for the full output from inside the container. ArcGIS Pro is not supported on . In the **Geoprocessing** pane, search for **GeoEngine** or browse to **Toolboxes > GeoEngine Tools**. Open **grid-creator**, fill in the parameters, and click **Run**. Container logs appear in the Geoprocessing messages panel. When the run completes, output files are added to your map automatically when ArcGIS Pro can read the output format. ArcGIS Pro is not supported on . *** ## Step 10 — Push to the Cloud Once you're happy with how the worker runs locally, publish it so your whole team can access it. Pushing requires a production apply, so first make sure `geoengine.yaml` has a valid `version` and `local_tag`, then rerun the local checks: ```bash theme={null} geoengine lint geoengine test ``` Then apply in production mode: ```bash theme={null} geoengine apply ``` Then push the image to the cloud: ```bash theme={null} geoengine push ``` GeoEngine pushes the most recently applied production `local_tag` and publishes it with the semantic `version` from `geoengine.yaml`. If you have access to multiple teams, you will be prompted to select the team you wish to push to. After pushing, the worker is available to everyone in your Nika organisation — in QGIS, ArcGIS Pro, and the Nika web platform — without them needing to run `geoengine apply` themselves. *** ## Next Steps You've gone from a zip file to a live cloud-deployed geoprocessing worker. Here's where to go from here: * [Running Workers in ArcGIS Pro & QGIS](/guides/custom-geoprocess-deployment/running-in-gis) — inputs, outputs, and layer handling in detail * [Designing Worker Tests](/guides/custom-geoprocess-deployment/test-designing) — fixtures, expected outputs, and semantic comparisons * [Versioning](/guides/custom-geoprocess-deployment/versioning) — how to version, tag, and roll back workers * [Cloud Push & Deployment](/guides/custom-geoprocess-deployment/cloud-push) — advanced push options and CI/CD integration # Designing Worker Tests Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/test-designing Design tight but stable GeoEngine worker tests using fixtures, expected outputs, and semantic comparisons GeoEngine workers can do almost anything: read rasters, create vectors, write folders of outputs, run analysis, transform files, or generate reports. That flexibility is powerful, but it also makes testing tricky. `geoengine test` gives you a structured way to test open-ended workers. Instead of only checking exact file matches, you describe small test cases with inputs and expectations: the worker should run successfully, create the right output files, and, whenever possible, match expected semantic output. Use `geoengine test` during development, before a production `geoengine apply` and `geoengine push`. It helps you catch broken inputs, missing dependencies, incorrect output paths, and accidental behavior changes earlier. *** ## What `geoengine test` Does A GeoEngine test case runs your worker through the same runtime path as: ```bash theme={null} geoengine run --actor CLI --json ``` That means tests use the applied worker image, the saved `geoengine.yaml` command contract, and GeoEngine's normal file/folder mounting behavior. A test can check things like: * The worker exits with code `0` * An output file was created * An output file has a minimum size * A folder contains a certain number of outputs * A file hash matches exactly * Text output matches with normalized whitespace * JSON or GeoJSON matches with numeric tolerance The best tests are tight but not brittle. They prove the worker produced the right result without failing on harmless serialization details. *** ## Test Folder Layout When you run `geoengine init`, GeoEngine can scaffold a `tests/` folder for you. The scaffolded layout is: ```text theme={null} tests/ geoengine.test.yaml fixtures/ expected/ ``` | Path | Purpose | | - | - | | `tests/geoengine.test.yaml` | The test manifest. This is where test cases are declared. | | `tests/fixtures/` | Small input files used by tests. | | `tests/expected/` | Expected output files, if you need comparisons. | | `tests/validators/` | Optional project-side helper scripts if your team wants them. `geoengine init` does not create this folder, and the core `geoengine test` command does not run these automatically. | When tests run, GeoEngine writes generated outputs to: ```text theme={null} .geoengine-test/ ``` You should not use `.geoengine-test/` as a fixture folder. It is a temporary output area created by `geoengine test`. `tests/` and `.geoengine-test/` are excluded from the Docker build context. Test fixtures should not be baked into your worker image. *** ## Path Resolution Rules `geoengine test` resolves paths differently depending on whether the input is read-only or writable. ### Read-only file and folder inputs For normal file/folder inputs, relative paths are resolved from `tests/`. ```yaml theme={null} inputs: input-file: fixtures/small_extent.geojson ``` This points to: ```text theme={null} tests/fixtures/small_extent.geojson ``` ### Output file and folder inputs For inputs marked with `output: true` in `geoengine.yaml`, relative paths are resolved inside the per-case test output folder. ```yaml theme={null} inputs: output-dir: outputs ``` For a case named `square-grid`, this points to: ```text theme={null} .geoengine-test/square-grid/outputs ``` This keeps test outputs isolated and repeatable. *** ## Manifest Assertions Each case in `tests/geoengine.test.yaml` can include `inputs`, extra raw `args`, and an `expect` block. ```yaml theme={null} version: 1 cases: - name: smoke inputs: input-file: fixtures/sample.geojson output-dir: outputs args: [] expect: exit_code: 0 files: - path: outputs/result.geojson exists: true min_size: 1 compare: - actual: outputs/result.geojson expected: expected/result.geojson mode: geojson ``` ### File expectations | Field | Description | | - | - | | `path` | One file or folder to check. It can be an output input name, such as `output`, or a path relative to the case output folder. | | `glob` | Match files under the case output folder. Supports `*`, `?`, and `**`. | | `exists` | Defaults to `true`. Set to `false` when a path should not exist. | | `missing` | Set to `true` when a path should be absent. | | `min_size` / `max_size` | Check file size in bytes. | | `count` | With `glob`, assert the number of matches. | | `sha256` | Require an exact SHA-256 hash. Use only for deterministic bytes. | | `extension` | Require a file extension, such as `.geojson` or `.csv`. | ### Comparisons | Field | Description | | - | - | | `actual` | Output file path, resolved from the case output folder unless it names an input path. | | `expected` | Expected file path, resolved from `tests/`. | | `mode` | `bytes` or `exact` for byte comparison, `text` for text, `json` for JSON, `geojson` for GeoJSON. Defaults to `bytes`. | | `normalize_whitespace` | For `text` mode, compare collapsed whitespace instead of exact spacing. | | `tolerance.numbers` | Numeric tolerance for `json` or `geojson` comparisons. | | `tolerance.coordinates` | Alias for numeric tolerance in geospatial comparisons. | | `ignore_paths` | Dot-style JSON paths to ignore, such as `$.name` or `$.features.0.properties.id`. | JSON and GeoJSON comparisons are structural: object keys and array order must match unless a path is ignored, and numbers can differ within the configured tolerance. *** ## Start With the Worker Contract Before writing tests, inspect `geoengine.yaml` and answer: * Which inputs are required? * Which inputs are output paths? * Which branches are meaningful to test? * Which outputs are deterministic enough to compare? * Which metadata might vary between machines or library versions? A good test follows the worker contract. If the script writes to `output-dir` and uses `output-file` as a basename, the test should use those same inputs instead of assuming a hard-coded path inside the container. *** ## Smoke Tests vs Semantic Tests Smoke tests and semantic tests are both useful, but they are not the same. ### Smoke test A smoke test proves that the worker runs and writes something plausible: ```yaml theme={null} expect: exit_code: 0 files: - path: outputs/result.geojson exists: true min_size: 1 ``` This catches common failures: * The worker crashes * A dependency is missing * The output path is wrong * Nothing was written A smoke test is a good starting point, but it does not prove the output is correct. ### Tight semantic test A semantic test checks the meaning of the output: ```yaml theme={null} expect: exit_code: 0 files: - path: outputs/result.geojson exists: true min_size: 1 extension: .geojson compare: - actual: outputs/result.geojson expected: expected/result.geojson mode: geojson tolerance: numbers: 0.000001 ignore_paths: - $.name - $.crs ``` This checks the generated data while allowing harmless metadata and floating-point differences. When the output is predictable, prefer semantic tests. Smoke-only tests should be the fallback floor, not the default finish line. *** ## Example: Testing a Grid Creator Worker Suppose your worker creates regular grids from an input vector extent. The relevant `geoengine.yaml` inputs might look like this: ```yaml theme={null} command: program: python script: grid_creation.py inputs: - name: input-file type: file required: true - name: grid-type type: enum required: false default: square enum_values: - square - rectangle - diamond - name: cell-width type: number required: true - name: cell-height type: number required: false - name: output-file type: string required: false default: regular_grid - name: output-dir type: folder required: true output: true - name: auto-reproject type: boolean required: false default: true - name: add-id type: boolean required: false default: true ``` Create a tiny fixture: ```text theme={null} tests/fixtures/small_extent.geojson ``` Then create `tests/geoengine.test.yaml`: ```yaml theme={null} version: 1 cases: - name: square-grid inputs: input-file: fixtures/small_extent.geojson grid-type: square cell-width: 0.001 output-file: square_grid output-dir: outputs auto-reproject: false add-id: true expect: exit_code: 0 files: - path: outputs/square_grid.geojson exists: true min_size: 1 extension: .geojson compare: - actual: outputs/square_grid.geojson expected: expected/square_grid.geojson mode: geojson tolerance: numbers: 0.000000001 ignore_paths: - $.name - $.crs - $.features.0.properties.id - $.features.1.properties.id - $.features.2.properties.id - $.features.3.properties.id - name: rectangle-grid inputs: input-file: fixtures/small_extent.geojson grid-type: rectangle cell-width: 0.001 cell-height: 0.002 output-file: rectangle_grid output-dir: outputs auto-reproject: false add-id: true expect: exit_code: 0 files: - path: outputs/rectangle_grid.geojson exists: true min_size: 1 extension: .geojson compare: - actual: outputs/rectangle_grid.geojson expected: expected/rectangle_grid.geojson mode: geojson tolerance: numbers: 0.000000001 ignore_paths: - $.name - $.crs - $.features.0.properties.id - $.features.1.properties.id ``` This tests two important code paths: * A square grid with only `cell-width` * A rectangle grid with both `cell-width` and `cell-height` It is tighter than a smoke test because it compares generated GeoJSON against expected output. It is still not brittle because it ignores harmless writer metadata such as top-level `name`, `crs`, and generated feature `id` fields. *** ## Running Tests Before running tests, lint and apply the worker in development mode: ```bash theme={null} geoengine lint geoengine apply --dev ``` Then run all test cases: ```bash theme={null} geoengine test ``` Run one case by name: ```bash theme={null} geoengine test --case square-grid ``` Keep the generated `.geoengine-test/` output folders for inspection: ```bash theme={null} geoengine test --keep-workdir ``` Emit a JSON test report: ```bash theme={null} geoengine test --json ``` Show container logs for every case, even when the case passes: ```bash theme={null} geoengine test --verbose ``` Test a specific applied local tag: ```bash theme={null} geoengine test --tag codex-1.0.0 ``` *** ## Recommended Development Loop Use this loop while building or changing a worker: ```bash theme={null} geoengine lint geoengine apply --dev geoengine test ``` If tests fail, fix the correct layer: | Failure | Usually check | | - | - | | `geoengine lint` fails | `geoengine.yaml` structure or input definitions | | `geoengine apply --dev` fails | Dependencies, Docker build, script path, config | | `geoengine test` exits non-zero | Script logic, missing dependencies, bad test inputs | | Output file missing | Output path, `output: true`, script write location | | Comparison fails | Expected file, tolerance, output format, real behavior change | Repeat the loop until tests pass. Only then do a production apply: ```bash theme={null} geoengine apply ``` And, when ready, push: ```bash theme={null} geoengine push ``` *** ## Choosing the Right Assertion Strictness Start with the strongest check that matches the stability of the output. ### Smoke test Use this for highly open-ended outputs, early scaffolding, or as a baseline case: ```yaml theme={null} expect: exit_code: 0 files: - path: output exists: true min_size: 1 ``` This catches the most common problems: the worker failed, wrote nothing, or wrote to the wrong place. It does not prove the output is correct. ### Tight semantic test Use this when the expected result can be described: ```yaml theme={null} expect: files: - path: outputs/result.geojson exists: true min_size: 1 compare: - actual: outputs/result.geojson expected: expected/result.geojson mode: geojson tolerance: numbers: 0.000001 ignore_paths: - $.name - $.crs ``` This is usually the best option for geospatial outputs: it checks meaningful content while allowing harmless floating-point and metadata differences. ### Exact hash test Use hashes only when output is truly stable: ```yaml theme={null} expect: files: - path: outputs/result.csv sha256: "abc123..." ``` Avoid hash checks for files that include timestamps, unordered features, generated IDs, floating-point formatting, or metadata that may vary between library versions. *** ## Good Practices ### Prefer tight semantic checks A good test should prove the worker produced the right result, not merely that it produced a file. For deterministic outputs, prefer checks like: * Expected feature count * Expected properties or columns * Expected geometry type * Expected filenames * Expected CRS behavior, when stable * Expected numeric values with tolerance For example, a grid worker should usually compare against an expected GeoJSON file with `mode: geojson`, rather than only checking that `output.geojson` exists. ### Avoid brittle serialization details Some output fields depend on the writer library, driver version, or machine environment. Ignore these when they are not part of the worker contract. Common fields to ignore: ```yaml theme={null} ignore_paths: - $.name - $.crs - $.features.0.properties.id ``` The goal is to test meaning, not harmless metadata. ### Keep fixtures small Use the smallest fixture that exercises the behavior. A tiny GeoJSON polygon, a few CSV rows, or a small raster tile is usually better than a realistic production-sized file. Small fixtures make tests: * Faster * Easier to review * Easier to debug * Safer to commit ### Test representative branches Do not write ten nearly identical smoke tests. Instead, choose cases that cover meaningful behavior changes. For example, a grid worker might test: * `square` * `rectangle` * `diamond` * Optional `add-id: false` * Auto-reprojection on/off, if that behavior matters ### Use exact hashes sparingly Hashes are useful only when the entire file is deterministic. Avoid hashes for GeoJSON, rasters, reports, or files with timestamps unless you are certain the serialization is stable. Prefer structured comparison with tolerance when possible. ### Commit test inputs and expected outputs Commit: ```text theme={null} tests/fixtures/ tests/expected/ tests/geoengine.test.yaml ``` Do not commit: ```text theme={null} .geoengine-test/ ``` That folder is generated by test runs. *** ## Writing Useful Fixtures Keep fixtures small and intentional. Good fixtures are: * Tiny enough to commit to Git * Representative of real user input * Focused on one behavior * Stable across machines * Free of private or customer data Avoid fixtures that are: * Huge * Downloaded from the network during tests * Machine-specific * Licensed or sensitive * More complicated than the behavior being tested For geospatial workers, a tiny GeoJSON polygon or point collection is often enough for a meaningful test. *** ## Working With AI Agents If you are using an AI coding assistant with GeoEngine skills installed, ask it to create tests after the worker config is wired up. Example prompt: ```text theme={null} Create GeoEngine test cases for this worker using the GeoEngine testing guidance. Use small fixtures and prefer tight semantic tests where the output is predictable. Avoid brittle exact hashes unless the output serialization is deterministic. Then run geoengine lint, geoengine apply --dev, and geoengine test. If tests fail, fix the correct layer and repeat until they pass. ``` A good AI-generated test should include: * `tests/geoengine.test.yaml` * At least one small fixture * Expected outputs when the result is predictable * Assertions that match the worker's real outputs * No large generated output committed as a fixture unless it is intentional *** ## What to Commit For a normal worker repository, commit: ```bash theme={null} git add geoengine.yaml pixi.toml geoengine.lock tests/ *.py ``` For R workers, replace `*.py` with `*.R`. Do not commit: ```text theme={null} .geoengine-test/ ``` That folder is runtime output from tests. *** ## Common Mistakes ### The test passes locally but fails for a teammate Make sure `geoengine.lock` is committed so everyone is applying and testing the same worker ID. Also make sure fixtures use relative paths under `tests/`, not absolute paths from your machine. ### The worker writes no output Check that the corresponding `geoengine.yaml` input is marked as an output: ```yaml theme={null} - name: output-dir type: folder output: true ``` If `output: true` is missing, GeoEngine treats the path as read-only input instead of a writable output mount. ### The test is too loose If your test only checks that a file exists, ask whether the output is predictable enough to compare. For deterministic workers, add an expected output and use `mode: json`, `mode: geojson`, or normalized text comparison. ### The test is too brittle If a comparison fails because of metadata, writer-specific fields, timestamps, generated IDs, or tiny floating-point differences, ignore or tolerate those fields instead of weakening the whole test. For example: ```yaml theme={null} tolerance: numbers: 0.000001 ignore_paths: - $.name - $.crs - $.features.0.properties.id ``` ### Tests force image rebuilds `tests/` and `.geoengine-test/` are ignored by GeoEngine's Docker build context. If changing tests appears to trigger rebuilds, update GeoEngine and run: ```bash theme={null} geoengine patch ``` *** ## Summary Use `geoengine test` to make worker development repeatable: ```bash theme={null} geoengine lint geoengine apply --dev geoengine test ``` A good worker test should be tight enough to catch wrong results and flexible enough to ignore harmless serialization differences. Smoke tests are useful, but when the output is predictable, prefer semantic comparisons with expected files and tolerances. # Version Workers Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/versioning Understand how GeoEngine versions workers, the difference between versions and local tags, and how to reproduce any past build exactly GeoEngine uses [Semantic Versioning](https://semver.org/) for cloud-facing worker releases and a separate `local_tag` for local builds. Every production apply records a local tag and a config snapshot, so any past production build can be reproduced and run later — even after the code has changed. *** ## Versions vs Local Tags These two concepts are related but distinct: * **Version** — the semantic version string you set in `geoengine.yaml` (e.g. `1.2.0`). It follows `MAJOR.MINOR.PATCH` rules and is enforced by GeoEngine during production applies. This is the version sent to the cloud when you push. * **Local tag** — the local build label GeoEngine uses for Docker tags and saved snapshots. Set it with `local_tag` in `geoengine.yaml` when you want a named local build (for example `release-candidate`). If you omit it during a production apply, GeoEngine asks whether to use the `version` value as the local tag. You reference a specific past build using its local tag (for example `--tag 1.2.0` or `--tag release-candidate`), not necessarily the raw semantic version. *** ## Version Format Worker versions follow the `MAJOR.MINOR.PATCH` format, set in `geoengine.yaml`: ```yaml theme={null} name: my-worker version: "1.2.0" local_tag: "1.2.0" ``` All three version components are required. Examples of valid versions: `1.0.0`, `0.3.1`, `2.10.4`. A version like `1.0` or `1` is invalid and will cause a production `geoengine apply` to fail. As a general guide: * **PATCH** (`1.0.0` → `1.0.1`) — bug fixes, small script tweaks, no change to inputs or outputs * **MINOR** (`1.0.0` → `1.1.0`) — new optional inputs, improved output, backwards-compatible changes * **MAJOR** (`1.0.0` → `2.0.0`) — removed or renamed inputs, changed output format, breaking changes *** ## Dev vs Production Applies GeoEngine has two apply modes. Which one you use determines whether versioning is enforced and whether a snapshot is saved. | | Dev (`--dev`) | Production (no flag) | | - | - | - | | Version check | Skipped | Enforced | | Image tagged as | `latest` only | `:` + `latest` | | Config snapshot saved | Mutable `latest` snapshot | Tagged snapshot + `latest` | | Reproducible later | No | Yes — via `--tag` | | Appears in GIS by version | No — `latest` only | Yes | ### During Development Use `--dev` to iterate freely without worrying about version numbers: ```bash theme={null} geoengine apply --dev ``` The image is tagged as `latest`. Running `geoengine apply --dev` again overwrites the mutable latest image and latest config, even if a prior production version exists. ### For Production Releases When the worker is ready to share or use in GIS tools, apply without `--dev`: ```bash theme={null} geoengine apply ``` GeoEngine will enforce that: 1. The `version` field is present in `geoengine.yaml` 2. The version is a valid semver string (`MAJOR.MINOR.PATCH`) 3. The version is **greater than or equal to** the highest version currently recorded locally 4. The selected `local_tag` is not `latest` and does not already point to different content If any of these checks fail, the apply is rejected with an error. If `local_tag` is missing, GeoEngine prompts you to use the version string as the local tag. Accepting this is fine for normal releases; add an explicit `local_tag` when you need multiple local builds for the same version. *** ## Running a Specific Tag To run a previously-built local tag instead of `latest`: ```bash theme={null} geoengine run --actor CLI --tag 1.0.0 --input input-file=/path/to/data.tif ``` GeoEngine loads the snapshotted configuration for that tag and runs the corresponding Docker image. This works regardless of what the current `geoengine.yaml` says — the snapshot is self-contained. If `--tag` is omitted, `geoengine run` always uses `latest`, which tracks the most recent apply (dev or production). *** ## The `latest` Tag `latest` always points to the most recent apply, regardless of mode: * Running `geoengine apply --dev` after a production apply will overwrite `latest` with the dev state * Running `geoengine apply` (production) also updates `latest` to that version This means `geoengine run` (without `--tag`) and GIS plugin `latest` entries always reflect the last apply. **If you need a stable, pinned version in GIS, always use a production apply and reference it by its local tag.** *** ## Deleting a Tag To remove a specific local tag (its Docker image, mapping entry, and snapshot): ```bash theme={null} geoengine delete --tag 1.0.0 ``` The version check during the next `geoengine apply` always reads the live `map.json`, so deleting an older tag does not affect the minimum allowed version for the next apply. To remove a worker entirely, run from the worker directory or pass `--id `: ```bash theme={null} geoengine delete ``` *** ## Example Versioning Workflow ```bash theme={null} # --- Development phase --- # Iterate freely without bumping the version geoengine apply --dev # updates mutable latest geoengine apply --dev # overwrites latest again # --- Ready for release --- # Bump version in geoengine.yaml to 1.0.0, then: geoengine apply # saves snapshot, creates local tag 1.0.0 + latest # --- Iteration after release --- geoengine apply --dev # dev build overwrites latest geoengine apply --dev # keep iterating # --- Next release --- # Bump version to 1.1.0, then: geoengine apply # saves snapshot, creates local tag 1.1.0 + latest # --- Run a specific old build by its local tag --- geoengine run --actor CLI --tag 1.0.0 --input input-file=/data.tif ``` # Collaborate on Workers Source: https://docs.nikaplanet.com/guides/custom-geoprocess-deployment/worker-collaboration Share a worker's source code with your team using GitHub so multiple developers can contribute and push updates GeoEngine workers are just files — `geoengine.yaml`, `pixi.toml`, your script, `geoengine.lock`, and usually a `tests/` folder. Putting them in a Git repository lets your whole development team work on the same worker, review changes, and push new versions independently. *** ## Step 1: Create a GitHub Repository Go to [github.com](https://github.com) and create a new repository. Name it after your worker (e.g. `land-cover-classifier`). Leave it empty — no README, no `.gitignore` — you'll push the worker directory as the initial commit. *** ## Step 2: Initialise Git in Your Worker Directory From inside the worker directory, run: ```bash theme={null} echo "# land-cover-classifier" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin git push -u origin main ``` Replace `` with the HTTPS or SSH URL from your GitHub repo (e.g. `https://github.com/your-org/land-cover-classifier.git`). Then add the rest of the worker files: ```bash theme={null} git add geoengine.yaml pixi.toml geoengine.lock tests/ *.py # or *.R for R workers git commit -m "add worker files" git push ``` Commit `geoengine.lock` — it stores the worker ID that ties local builds to the cloud registry. Without it, teammates who clone the repo will get a fresh ID and create a separate worker instead of sharing yours. *** ## Step 3: Teammates Clone and Apply Anyone on the team can clone the repo and apply the worker locally: ```bash theme={null} git clone cd land-cover-classifier geoengine lint geoengine apply --dev geoengine test ``` Because `geoengine.lock` is committed, everyone works against the same worker ID. Local builds stay on each person's machine — nothing is shared until someone runs `geoengine push`. *** ## Step 4: Pushing Changes The normal development loop for each contributor: ```bash theme={null} # Pull the latest changes git pull # Make your edits, then apply locally and run worker tests geoengine lint geoengine apply --dev geoengine test # When ready to release, bump version/local_tag in geoengine.yaml, then: geoengine lint geoengine test geoengine apply # production apply — builds versioned image geoengine push # publish to the cloud # Commit and push the source changes git add geoengine.yaml pixi.toml tests/ *.py git commit -m "feat: add confidence threshold input (v1.1.0)" git push ``` Any team member with access to the same Nika tenant can run `geoengine push` and the worker will appear under the same entry in the cloud registry — no extra setup needed. *** ## Known Limitations **Versioning is on you.** GeoEngine enforces that each production apply uses a version that is greater than or equal to the highest version already recorded locally — but it does not enforce coordination between different machines. If two developers both bump to `1.1.0` in their local `geoengine.yaml` and try to push, GeoEngine will accept both applies locally. Agree on version numbers and local tags with your team before doing a production apply, and use the Git commit as the source of truth for what version is current. **First push wins for a given version.** If two teammates both apply and push the same version (e.g. `1.1.0`), only the first push will succeed; subsequent pushes of the same version will be rejected. Coordinate releases, or use a simple rule: the person who merged the PR does the push. **Dev builds are local only.** `geoengine apply --dev` never touches the cloud. Only production applies (`geoengine apply` without `--dev`) produce images that can be pushed. # Access Job Outputs Source: https://docs.nikaplanet.com/guides/custom-geoprocess-usage/access-job-outputs View job history and access the outputs of your custom geoprocessing jobs directly inside the QGIS and ArcGIS NIKA plugin. On both versions of the plugin, you can access the job history by clicking the "Job History" button in the NikaPlanet panel. The panel lets you view the history of all your jobs, both past and active. The job history panel is searchable by worker name, version, job ID. QGIS Job History By clicking "filters", you can fine-tune the search results to specific workers, versions, teams, or dates: QGIS Filters If a job has outputs, you can click the "outputs" tab to view the outputs. The outputs window supports multi-select as well as downloading and adding the files as layers. QGIS Outputs Outputs will only be available for 3 days after the job completes, so be sure to download them if you need them after that. # Setup the Plugin in GIS Source: https://docs.nikaplanet.com/guides/custom-geoprocess-usage/setup-plugin-in-gis Install and configure the NIKA Planet plugin in QGIS or ArcGIS to run custom geoprocessing workers directly from your GIS.
## Installing the plugin The QGIS plugin for NikaPlanet is available [here](https://github.com/NikaGeospatial/nikaplanet-qgis-plugin). To install the plugin: 1. On the github repository page, click on the code button and select "Download ZIP" QGIS Zip Download 2. In QGIS, go to the "Plugins" menu (upper left) and select "Manage and Install Plugins..." QGIS Plugin Menu 3. Click the "Install Plugin From ZIP" button, then click the "..." button and select the downloaded ZIP file QGIS Install Plugin From ZIP 4. Click the "Install Plugin" button 5. The plugin will be installed and you can now use it to connect to NikaPlanet ## Logging in to NikaPlanet Logins are shared between the NikaPlanet website and the QGIS plugin. If you are already logged in to NikaPlanet, you simply need to authorize the plugin to access your account. 1. In QGIS, click the "NikaPlanet" button in the top bar. It is generally located beside the Python button. QGIS Plugin Button 2. If this is your first time logging in, you will be prompted to authorize the plugin to access your account. Click the "Sign in with NikaPlanet" button. QGIS Login Prompt 3. You will be redirected to the NikaPlanet login page. Enter your NikaPlanet credentials and click the "Sign in" button. NikaPlanet Login 4. You will be redirected back to QGIS and the NikaPlanet panel will automatically navigate to the dashboard. Click the "Geoengine Workers" button to view your workers. QGIS Landing ## Installing the plugin The ArcGIS Pro plugin is currently not available for download. Please contact us at [support@nikaplanet.com](mailto:support@nikaplanet.com) if you are interested in using the plugin. ## Logging in to NikaPlanet Logins are shared between the NikaPlanet website and the ArcGIS Pro plugin. If you are already logged in to NikaPlanet, you simply need to authorize the plugin to access your account. 1. In ArcGIS Pro, click the "Nika" tab in the top bar, then click the "Show Panel" button. 2. If this is your first time logging in, you will be prompted to authorize the plugin to access your account. Click the "Sign in with NikaPlanet" button. ArcGIS Login Prompt 3. You will be redirected to the NikaPlanet login page. Enter your NikaPlanet credentials and click the "Sign in" button. NikaPlanet Login 4. You will be redirected back to ArcGIS Pro and the NikaPlanet panel will automatically navigate to the dashboard. Click the "Geoengine Workers" button to view your workers. ArcGIS Landing # Submit a Job Source: https://docs.nikaplanet.com/guides/custom-geoprocess-usage/submitting-a-job Submit a custom geoprocessing job to a deployed NIKA worker from QGIS or ArcGIS, and track its progress from the plugin.
To submit a job, your team (or a team you have access to) must have a worker deployed to their workspace. To learn more about deploying a worker, see the [Geoengine deployment](/guides/custom-geoprocess-deployment/step-by-step) guide. 1. Identify the worker you want to run. Take note of the worker's name and version. QGIS Worker List 2. Click "select this version" to open the job dialog. 3. Fill in the required input parameters and choose an appropriate machine type. Note that larger machines may take longer to start up. QGIS Input Parameters 4. Configure what you want to do after the job completes: * Download the outputs to your local machine * Add the outputs as layers to your QGIS project QGIS Post Job Behavior 5. Click the "Submit Job" button to submit the job. If you choose to download the outputs, you will be prompted to select a folder to download the outputs to. 6. The job will be submitted and you will be able to view the job in the "Job History" panel. QGIS Job List 7. Once the job completes, you will be able to view the outputs by clicking on the job in the "Job History" panel and clicking on the "outputs" tab. QGIS Outputs To submit a job, your team (or a team you have access to) must have a worker deployed to their workspace. To learn more about deploying a worker, see the [Geoengine deployment](/guides/custom-geoprocess-deployment/step-by-step) guide. 1. Identify the worker you want to run. Take note of the worker's name and version. ArcGIS Worker List 2. Click "select this version" to open the job dialog. 3. Fill in the required input parameters and choose an appropriate machine type. Note that larger machines may take longer to start up. ArcGIS Input Parameters 4. Configure what you want to do after the job completes: * Download the outputs to your local machine * Add the outputs as layers to your ArcGIS Pro project ArcGIS Post Job Behavior 5. Click the "Submit Job" button to submit the job. If you choose to download the outputs, you will be prompted to select a folder to download the outputs to. 6. The job will be submitted and you will be able to view the job in the "Job History" panel. ArcGIS Job List 7. Once the job completes, you will be able to view the outputs by clicking on the job in the "Job History" panel and clicking on the "outputs" tab. ArcGIS Outputs # AI Coding in Notebook Source: https://docs.nikaplanet.com/guides/data-analysis/ai-coding-in-notebook Learn how to use AI-powered coding features including quick edits, error resolution, and intelligent code suggestions in Nika notebooks Learn how to leverage AI-powered features in Nika notebooks for faster coding, error resolution, and intelligent code suggestions. Use built-in AI tools to enhance your development workflow. ## Step 1: Quick AI Edit ### Built-in AI Suggestions 1. **Trigger AI Edit**: Press `Cmd/Ctrl + K` or click the AI edit button in the code block toolbar 2. **AI Analyzes Code**: AI reviews your code and suggests improvements 3. **Green Suggestions**: AI suggestions appear in green text 4. **Preview Execution**: Code runs with suggested changes even before accepting ### Accepting Changes * **Line by Line**: Accept individual suggestions one at a time * **Accept All**: Accept all AI suggestions at once * **Undo Actions**: Use `Ctrl + Z` to undo accept/reject actions * **Preview Mode**: See how code performs with suggestions before committing ### AI Edit Features * **Context-Aware**: AI understands your notebook's full context * **Smart Suggestions**: Intelligent code improvements and optimizations * **Real-time Preview**: Test suggested changes immediately * **Flexible Control**: Accept, reject, or modify suggestions as needed Quick AI Edit ## Step 2: Error Resolution with GAIA ### "Resolve in GAIA" Button When code encounters errors: 1. **Error Occurs**: Code execution fails with detailed error message 2. **Click "Resolve in GAIA"**: Click the blue button in the error output 3. **AI Agent Activation**: Nika's AI agent analyzes the entire notebook context 4. **Comprehensive Analysis**: AI looks at the bigger picture, not just the error ### GAIA's Analysis * **Full Context**: Analyzes entire notebook, not just the error line * **Dependency Tracking**: Understands library imports and dependencies * **Data Flow**: Tracks how data flows through your analysis * **Best Practices**: Suggests improvements based on coding standards Resolve in GAIA Button ## Step 3: GAIA Chat Interface ### AI-Powered Chat After clicking "Resolve in GAIA": 1. **Chat Panel Opens**: GAIA chat panel appears on the right side 2. **Error Context**: AI shows understanding of the error and notebook context 3. **Interactive Chat**: Ask questions and get AI assistance 4. **Streaming Responses**: See AI responses stream in real-time ### Chat Features * **Natural Language**: Ask questions in plain English * **Code Modifications**: AI can modify your notebook directly * **Explanation**: Get detailed explanations of errors and solutions * **Step-by-Step**: Receive guided solutions for complex problems ### Example Chat Interaction ``` User: "can you fix it?" GAIA: "I see the issue. The Google Earth Engine collection query is being aborted because it's trying to retrieve too many elements at once. Let me fix this by implementing pagination..." ``` GAIA Chat Interface ## Step 4: AI-Powered Code Execution ### Streaming AI Execution * **Real-time Modifications**: AI can modify your notebook as you chat * **Direct Integration**: Changes appear directly in your code blocks * **Context Preservation**: AI maintains your notebook's structure and flow * **Immediate Testing**: Modified code can be executed right away ### AI Model Selection * **GPT-4.1-mini**: Fast and efficient AI model for quick responses * **Context-Aware**: Model understands your specific notebook context * **Error-Specific**: Tailored responses based on the exact error encountered * **Learning**: AI learns from your coding patterns and preferences ## Step 5: Advanced AI Features ### Intelligent Code Suggestions * **Auto-completion**: AI suggests code completions as you type * **Import Optimization**: Automatically suggest and add required imports * **Error Prevention**: Catch potential errors before they occur * **Performance Optimization**: Suggest more efficient code patterns ### Context-Aware Assistance * **Notebook History**: AI remembers previous code blocks and outputs * **Data Understanding**: AI understands your data structures and types * **Library Knowledge**: AI knows about available libraries and their usage * **Best Practices**: Suggest improvements based on coding standards ## Next Steps Now that you can use AI coding features: 1. **Practice AI Edit**: Try `Cmd/Ctrl + K` on your code blocks 2. **Test Error Resolution**: Use "Resolve in GAIA" when you encounter errors 3. **Explore Chat**: Ask GAIA questions about your code and data 4. **Learn Patterns**: Observe how AI suggests improvements Happy AI-powered coding! # Create a Notebook to Start Analysis Source: https://docs.nikaplanet.com/guides/data-analysis/create-your-first-notebook Learn how to create notebooks in NikaWorkspace for data analysis with collaborative features and auto-saving Learn how to create notebooks in NikaWorkspace for data analysis. Notebooks are auto-saved and persisted across sessions, allowing you and your team members to collaborate on the same notebook at any time. ## Step 1: Create a Blank Notebook ### Click the "+" Icon 1. **Navigate to Notebooks**: Click on "Notebooks" in the left sidebar 2. **Click "+" Button**: Click the "+" button in the notebook list 3. **Select "Blank Notebook"**: Choose "Blank Notebook" from the dropdown menu 4. **Notebook Created**: A new blank notebook opens automatically Create Blank Notebook ### Auto-Save Feature * **Everything Auto-Saved**: All changes are automatically saved * **No Manual Saving**: No need to click save buttons * **Cross-Session Persistence**: Notebook persists across browser sessions * **Team Sync**: Changes sync automatically with team members ## Step 2: Rename Your Notebook ### Edit the Title 1. **Click Title Area**: Click on the notebook title at the top left 2. **Type New Name**: Enter a descriptive name for your notebook 3. **Auto-Save**: The new name is automatically saved 4. **Professional Naming**: Use clear, descriptive names like "Data Analysis Project" or "Machine Learning Model" Rename Notebook ### Naming Best Practices * **Descriptive Names**: Use names that describe the content or purpose * **Date Format**: Include dates if relevant (e.g., "Analysis\_2025\_08\_05") * **Project Context**: Include project or client names if applicable * **Version Numbers**: Add version numbers for iterative work ## Step 3: Alternative - Duplicate Existing Notebook ### Right-Click Method 1. **Find Notebook**: Locate the notebook you want to duplicate in the list 2. **Right-Click**: Right-click on the notebook name 3. **Select "Duplicate"**: Choose "Duplicate" from the context menu 4. **New Copy Created**: A copy of the notebook is created with "(Copy)" suffix Duplicate Notebook ### When to Duplicate * **Template Use**: Duplicate notebooks that serve as templates * **Version Control**: Create copies before making major changes * **Team Sharing**: Duplicate shared notebooks via link from another workspace to share notebook with others securely * **Experiment Safely**: Test changes on a copy before modifying original ## Step 4: Add Content as Blocks ### Adding New Blocks #### Method 1: Click "+" Icon 1. **Find "+" Button**: Look for the "+" icon on the left of any row 2. **Click "+"**: Click the "+" button to add a new block 3. **Select Block Type**: Choose from the available block types 4. **Block Added**: New block appears below the current row #### Method 2: Keyboard Shortcut 1. **Press "/"**: Type "/" in any empty row to trigger block selection 2. **Choose Block**: Select the desired block type from the menu 3. **Block Created**: New block is created with the selected type Cool Blocks Available ### Block Toolbar The floating toolbar provides quick access to: * **Code Block**: `< >` icon * **Alert Block**: `▲` icon * **Headings**: H1, H2, H3 options * **Lists**: Numbered, bulleted, and checkbox lists * **Media**: Images, video, audio, and file attachments * **Formatting**: Text blocks, tables, and emojis ### Block Types Available #### Code Block * **Python Code**: Write and execute Python code * **Kernel Integration**: Runs in the selected VM kernel * **Output Display**: Shows results, plots, and errors * **Variable Persistence**: Variables persist across cells #### Alert Block * **Important Information**: Highlight important notes with blue info boxes * **Warning Messages**: Display warnings and cautions * **Info Boxes**: Provide additional information with white 'i' icon * **Customizable**: Choose different alert styles #### Content Blocks * **Headings**: Create section headers (H1, H2, H3) * **Paragraphs**: Add plain text paragraphs * **Lists**: Create bulleted lists (•), numbered lists (1.), and checkboxes (☐) * **Tables**: Create data tables with grid layout #### Media Blocks * **Images**: Insert images or GIFs to your notebook * **Video Clips**: Add video content to your analysis * **Audio**: Include audio files for multimedia notebooks * **File Attachments**: Attach documents and other files ## Key Features ### Auto-Save and Persistence * **Real-time Save**: Changes are saved automatically * **No Manual Save**: No need to click save buttons * **Cross-session**: Notebook persists across browser sessions * **Team Sync**: Changes sync with team members ### Collaborative Features * **Multiple Users**: Multiple team members can work simultaneously * **Live Cursors**: See where others are working * **Change Indicators**: Visual indicators for recent changes * **Auto-sync**: Changes sync automatically across users ### Enhanced Over Jupyter * **Rich Media**: Support for images, videos, and audio * **Interactive Lists**: Checkbox lists and interactive elements * **Alert Blocks**: Highlight important information * **Better UI**: Modern, intuitive interface * **Team Collaboration**: Real-time collaborative editing ## Best Practices ### Notebook Organization * **Clear Structure**: Organize notebooks logically with headings * **Descriptive Names**: Use clear, descriptive names * **Documentation**: Add markdown cells for documentation * **Modular Code**: Break code into logical sections ### Content Creation * **Use Alerts**: Highlight important information with alert blocks * **Rich Media**: Include images and videos to enhance analysis * **Interactive Elements**: Use checkboxes and lists for organization * **Clear Documentation**: Document your analysis process ### Collaboration * **Communication**: Communicate with team members * **Clear Comments**: Add clear comments to your code * **Regular Updates**: Keep notebooks current and updated * **Share Knowledge**: Use notebooks to share knowledge ## Next Steps Now that you've created your notebook: 1. **Add Content**: Start adding code blocks and documentation 2. **Run Code**: Learn about [Running Code in Notebook](/guides/data-analysis/run-code-in-notebook) 3. **Use Libraries**: Explore [Supported Python Libraries](/guides/data-analysis/supported-python-libraries) 4. **Publish**: [Publish Your Notebook](/guides/data-analysis/publish-notebook) to share with others Happy analyzing! # GDAL and CUDA Installation Source: https://docs.nikaplanet.com/guides/data-analysis/gdal-cuda-installation GDAL and CUDA are pre-installed on all ephemeral VM kernels for geospatial analysis and GPU acceleration GDAL and CUDA are pre-installed on all ephemeral VM kernels that your notebooks have direct access to. No manual installation required. ## Pre-Installed Software ### Available Configurations All VM kernels come with: * **GDAL 3.9.1**: Geospatial Data Abstraction Library for raster and vector data * **CUDA 12.2**: NVIDIA CUDA for GPU acceleration * **Python 3.10/3.11**: Multiple Python versions available ### Kernel Selection When starting your machine, you can choose from: * **Python 3.10, GDAL 3.9.1 CUDA 12.2** * **Python 3.11, GDAL 3.9.1 CUDA 12.2** * **Python 3.10, GDAL 3.9.1 CUDA 12** GDAL CUDA Pre-installed ## Ready to Use ### No Installation Required * **Pre-configured**: All geospatial libraries are ready to use * **GPU Ready**: CUDA drivers and libraries are installed * **Immediate Access**: Start analyzing geospatial data right away ### Direct Access * **Workspace Integration**: Direct access to workspace files * **Large Dataset Support**: Optimized for TB-PB sized geospatial data * **Performance Optimized**: GPU acceleration for raster processing ## Usage Examples ### GDAL Operations ```python theme={null} import rasterio import geopandas as gpd # Read raster data with rasterio.open('/workspace/data/satellite.tif') as src: data = src.read() # Read vector data gdf = gpd.read_file('/workspace/data/shapefile.shp') ``` ### CUDA Acceleration ```python theme={null} import cupy as cp import numpy as np # GPU-accelerated array operations gpu_array = cp.array(np.random.random((1000, 1000))) result = cp.linalg.svd(gpu_array) ``` ## Next Steps Now that you have GDAL and CUDA ready: 1. **Start Analysis**: Begin your geospatial analysis immediately 2. **Load Data**: Access your workspace data files 3. **Use GPU**: Leverage CUDA for accelerated processing 4. **Scale Up**: Work with large geospatial datasets efficiently Happy analyzing! # Publish a Notebook (with Access Control) Source: https://docs.nikaplanet.com/guides/data-analysis/publish-notebook Learn how to publish your notebook with team-only or public access, including thumbnail generation and collaboration features Learn how to publish your NikaWorkspace notebook for team collaboration or public sharing. The process is very similar to publishing maps - you can publish with different names, generate thumbnails using AI, and control access settings. ## Step 1: Access Publish Options ### Method 1: Right-Click on Notebook List 1. **Open Notebook List**: Navigate to your notebooks in the left panel 2. **Right-click Notebook**: Right-click on the notebook you want to publish 3. **Select "Publish"**: Choose the publish option from the context menu Right-click to Publish ### Method 2: Publish Button in Notebook 1. **Open Your Notebook**: Open the notebook you want to publish 2. **Find Publish Button**: Look for the publish button in the top toolbar 3. **Click Publish**: Click the publish button to open the publish dialog ## Step 2: Fill in Compulsory Fields ### Required Information (marked with asterisk \*) 1. **Title**\*: Enter a descriptive name for your published notebook 2. **Version**\*: Specify the version number (e.g., "1.0.0") 3. **Category**\*: Add at least one category by clicking "+ Add Category" ### Optional Information * **Description**: Add a detailed description of the notebook content (optional) * **Tags**: Add relevant tags for categorization (optional) ### Thumbnail Options You have three options for creating a thumbnail: #### Option 1: URL * Enter an image URL in the "Image URL" field #### Option 2: Upload * Click "Upload" and select an image file from your computer #### Option 3: AI Generate (Recommended if no thumbnail) * Click "AI Generate" with the sparkle icon * AI will automatically create a relevant thumbnail based on your notebook content ### Access Control Settings * **Public**: Anyone from public can discover and access the notebook. All public content can be found at [Nika Hub](https://planet.nika.eco/en/hub) * **Password Protected**: Anyone with the link can access with password. Share the link and password with specific users * **Restricted (Team Only)**: Only people from your organization can discover and access. All team published content can be found at [Team Hub](https://planet.nika.eco/en/dashboard/team-hub) if you are already signed in Publish Dialog with Required Fields ## Step 3: Update Published Notebook ### Access Update Options 1. **Open Published Notebook**: Open your published notebook 2. **Find Update Button**: Look for the update option in the publish dialog 3. **Modify Information**: Change any of the following: * Title and version * Description * Categories * Thumbnail (URL, upload, or AI generate) * Tags * Access Control (Public, Password Protected, or Team Only) ### Update Process 1. **Make Changes**: Modify the desired information 2. **Review Settings**: Double-check all settings 3. **Click "Update"**: Click the update button to republish changes 4. **Alternative: Unpublish**: Use "Unpublish" button to remove from public/team access Update Published Notebook Dialog ## Step 4: View Published Notebook ### Access Published Notebook 1. **Click Arrow Icon**: Click the arrow icon at the top right of the publish dialog 2. **New Tab Opens**: A new browser tab will open with your published notebook 3. **Static View**: The notebook opens in a static, view-only format ### Published Notebook Features * **View-Only Access**: Users can view but not edit the notebook * **Code and Output**: All code cells and their outputs are visible * **Interactive Elements**: Notebook maintains interactive features * **Public Hub**: If published publicly, the notebook appears in the NikaHub Published Notebook View ## Publishing Options ### Team-Only Publishing * **Restricted Access**: Only team members can access the notebook * **Collaboration Features**: Full collaborative editing capabilities * **Team Management**: Team admins can manage access * **Private Sharing**: Share within your organization only ### Password Protected Publishing * **Controlled Access**: Anyone with the link can access with password * **Secure Sharing**: Share the link and password with specific users * **Flexible Control**: Control who can access your notebook * **Easy Management**: Change or remove password as needed ### Public Publishing * **Public Access**: Anyone can view the published notebook * **Hub Listing**: Notebook appears in the [public notebook hub](https://planet.nika.eco/en/hub/notebooks) * **Community Sharing**: Share with the broader community * **Attribution**: Proper attribution to your organization ## Best Practices ### Before Publishing * **Complete Your Analysis**: Ensure all code cells are executed and results are visible * **Add Documentation**: Include markdown cells explaining your analysis * **Test Functionality**: Test all interactive elements * **Optimize Performance**: Ensure good loading performance ### Content Quality * **Accurate Analysis**: Ensure analysis accuracy and validity * **Clear Visualizations**: Create clear and informative visualizations * **Proper Documentation**: Use appropriate documentation and comments * **Clear Documentation**: Provide clear descriptions and documentation ### Publishing Strategy * **Consistent Naming**: Use consistent naming conventions * **Regular Updates**: Keep published notebooks current and updated * **Quality Assurance**: Implement quality assurance processes * **Community Engagement**: Engage with community feedback ## Troubleshooting ### Common Issues * **Publishing Fails**: Check that all required fields (marked with \*) are filled * **Thumbnail Issues**: Use AI generation if you don't have a thumbnail * **Permission Problems**: Verify access control settings (Public, Password Protected, or Team Only) * **Update Issues**: Ensure you click "Update" after making changes ### Solutions * **Validate Content**: Ensure all cells execute without errors * **Check Required Fields**: Review all fields marked with asterisks * **Test Locally**: Test notebook functionality before publishing * **Contact Support**: Contact support for persistent issues ## Next Steps Now that you've published your notebook: 1. **Share**: Share your published notebook with your team or community 2. **Monitor**: Monitor engagement and feedback 3. **Update**: Keep your notebook current and updated 4. **Engage**: Engage with the community and respond to feedback Happy publishing! # Run the Code in Notebook Source: https://docs.nikaplanet.com/guides/data-analysis/run-code-in-notebook Learn how to run code in notebooks with hover menus, keyboard shortcuts, streaming execution, and AI-powered debugging Learn how to run code in your NikaWorkspace notebooks with multiple execution methods, streaming output, and powerful debugging features. Code execution is streamed from the kernel, allowing you to close the workspace and return later to see results. ## Step 1: Run Individual Code Blocks ### Method 1: Hover Menu Run Button 1. **Hover Over Code Block**: Hover over any code block 2. **Click Run Button**: Click the play button (▶️) that appears in the hover menu 3. **Code Executes**: Code runs and output streams in below the block 4. **Status Updates**: Green checkmark shows successful execution ### Method 2: Keyboard Shortcut 1. **Select Code Block**: Click on the code block you want to run 2. **Press Shift+Enter**: Use the keyboard shortcut to execute 3. **Code Executes**: Code runs and cursor moves to next block 4. **View Results**: See streaming output in real-time Run Button in Hover Menu ## Step 2: Run All Code Blocks ### Run All Feature 1. **Click "Run All"**: Use the "Run All" button in the top-right toolbar 2. **Sequential Execution**: All codeNo Dragging Required blocks execute in order from top to bottom 3. **Progress Tracking**: Watch as each block executes in sequence 4. **Complete Execution**: All blocks finish with results displayed ### Clear All Outputs * **Click "Clear All Outputs"**: Remove all execution results * **Fresh Start**: Start with clean output areas * **Re-run**: Execute blocks again as needed Run All Button ## Step 3: Handle Exceptions and Errors ### Exception Display When code encounters errors: * **Detailed Error Messages**: Full exception details are displayed * **Traceback Information**: Complete stack trace for debugging * **Error Context**: Shows exactly where the error occurred * **Helpful Details**: Error messages provide debugging guidance ### AI-Powered Debugging * **"Resolve in GAIA" Button**: Click to get AI assistance with errors * **Smart Suggestions**: AI provides code fixes and explanations * **Context-Aware Help**: AI understands your notebook context * **Learn More**: See [AI Coding in Notebook](/guides/data-analysis/ai-coding-in-notebook) for detailed AI features Exception Handling with AI ## Step 4: Code Quality Features ### Real-Time Code Linting * **Syntax Checking**: Python syntax is checked after each line change * **Error Highlighting**: Syntax errors are highlighted immediately * **Best Practices**: Suggestions for code improvements * **Instant Feedback**: Get feedback as you type ### Autocompletion (Coming Soon) * **Tab Key Trigger**: Press Tab to trigger code completion * **Context-Aware**: Suggestions based on notebook context * **Smart Predictions**: AI-powered code completion * **Variable Recognition**: Understands variables in your notebook ## Step 5: Reorder Code Blocks ### Easy Block Reordering 1. **Use Arrow Buttons**: Click up/down arrow buttons in block toolbar 2. **Shift Blocks**: Move blocks up or down without dragging 3. **Visual Feedback**: See blocks move in real-time 4. **Maintain Order**: Keep logical flow of your analysis ### Block Management * **Shift Up**: Move block to previous position * **Shift Down**: Move block to next position * **Dragging**: Dragging block for reordering in a longer range * **Preserve Output**: Block outputs move with the code Block Reordering ## Step 6: Streaming Execution ### Background Execution * **Streaming Output**: Results stream in real-time from kernel * **Leave and Return**: Close workspace, return hours later * **Persistent Execution**: Long-running code continues in background * **Output Preservation**: All results are saved and displayed ### Long-Running Tasks ```python theme={null} # Example: Long-running analysis import time import pandas as pd # Load large dataset print("Loading large dataset...") data = pd.read_parquet('/workspace/data/massive_dataset.parquet') # Process data in chunks print("Processing data...") for i in range(100): chunk = data[i*1000:(i+1)*1000] # Complex processing here time.sleep(1) # Simulate processing time print(f"Processed chunk {i+1}/100") print("Analysis complete!") ``` ### Benefits of Streaming * **No Time Pressure**: Start long tasks and walk away * **Resource Efficiency**: Use compute resources effectively * **Progress Monitoring**: Check progress when you return * **Reliable Execution**: No interruption from browser closure ## Step 7: Code Execution Examples ### Basic Code Execution ```python theme={null} # Simple data analysis import pandas as pd import numpy as np # Load data data = pd.read_csv('/workspace/data/sample.csv') print(f"Dataset shape: {data.shape}") # Basic statistics print(f"Mean: {data['value'].mean()}") print(f"Standard deviation: {data['value'].std()}") ``` ### Library Installation ```python theme={null} # Install required libraries !pip install earthengine-api geemap geopandas # Libraries are installed and ready to use import ee import geemap import geopandas as gpd ``` ### Error Handling Example ```python theme={null} try: # Attempt to load data data = pd.read_csv('/workspace/data/missing_file.csv') except FileNotFoundError as e: print(f"Error: {e}") print("Please check if the file exists in the workspace") ``` ## Best Practices ### Code Organization * **Logical Flow**: Arrange blocks in logical order * **Clear Comments**: Add comments to explain your code * **Modular Code**: Break complex tasks into smaller blocks * **Error Handling**: Use try-catch blocks for robust code ### Execution Strategy * **Test Small**: Run small code blocks first * **Incremental Development**: Build analysis step by step * **Save Results**: Save intermediate results for long tasks * **Monitor Resources**: Keep track of memory and CPU usage ### Performance Tips * **Use Streaming**: Leverage background execution for long tasks * **Efficient Code**: Write optimized, vectorized code * **Batch Processing**: Process data in manageable chunks * **Resource Management**: Clean up large variables when done ## Troubleshooting ### Common Issues * **Code Not Running**: Check if VM is started and ready * **Syntax Errors**: Use the real-time linting to catch errors * **Long Execution**: Use streaming execution for background tasks * **Memory Issues**: Clear outputs or restart VM if needed ### Solutions * **Restart VM**: Stop and restart if VM becomes unresponsive * **Clear Outputs**: Use "Clear All Outputs" to free memory * **AI Debugging**: Use GAIA for help with complex errors * **Contact Support**: Get help for persistent issues ## Next Steps Now that you can run code effectively: 1. **AI Assistance**: Learn about [AI Coding in Notebook](/guides/data-analysis/ai-coding-in-notebook) for debugging 2. **Install Libraries**: Check [Supported Python Libraries](/guides/data-analysis/supported-python-libraries) 3. **Start Machine**: Learn about [Starting Your Machine](/guides/data-analysis/start-machine) 4. **Publish Results**: [Publish Your Notebook](/guides/data-analysis/publish-notebook) to share your work Happy coding! # Start Machine Source: https://docs.nikaplanet.com/guides/data-analysis/start-machine Learn how to start and manage VM kernels for Nika notebooks with different CPU and GPU configurations Learn how to start and manage VM kernels for your Nika notebooks. Choose from different CPU and GPU configurations to match your analysis needs. ## Step 1: Select Machine Type ### Available Configurations Choose from these pre-configured options: #### CPU Machines | Machine | CPU Cores | RAM | Ready Time | | - | - | - | - | | **CPUx3** | 3 | 24 GB | \<30 sec | | **CPUx7** | 7 | 53 GB | >2 min | | **CPUx20** | 20 | 156 GB | >2 min | | **CPUx42** | 42 | 326 GB | >2 min | #### GPU Machines | Machine | CPU Cores | RAM | GPU | GPU Memory | Ready Time | | - | - | - | - | - | - | | **Nvidia T4 x1** | 6 | 24 GB | 1x Tesla T4 | 16 GB | >2 min | | **Nvidia T4 x2** | 14 | 50 GB | 2x Tesla T4 | 32 GB | >2 min | | **Nvidia T4 x4** | 30 | 100 GB | 4x Tesla T4 | 64 GB | >2 min | | **Nvidia H100 x1** | 24 | 210 GB | 1x H100 | 80 GB | >2 min | Machine Selection Options ## Step 2: Start Your Machine ### Quick Start 1. **Select Configuration**: Choose your desired machine type from the dropdown 2. **Click "Start Machine"**: Click the prominent white button 3. **Wait for Ready**: Machine will be ready in 15-40 seconds depending on type ### Start Times * **CPUx3**: Under 30 seconds (fastest) * **All other machines**: Over 2 minutes (varies by availability) Start Machine Button ## Step 3: Monitor Machine Status ### Status Indicators Your machine status is shown as a colored indicator dot in the machine panel and the bottom-left icon. The color reflects the current state:
Green — Accessible
Machine is running and ready to execute code.
Orange — Starting
Machine is being provisioned. Applies to Pending, Running (container starting), and Succeeded states. Wait for it to turn green.
Red — Error
Something went wrong. This covers:
  • Failed — the machine crashed or encountered an error.
  • Unavailable — the required cloud compute resources could not be provisioned after multiple auto-retries on NikaPlanet's backend. It could be due to overwhelming demand for this machine type by all cloud users. You will have to wait for the supply to increased by cloud service provider.
Grey — Terminated
Machine is stopped. No compute charges apply.
### Viewing Status #### Method 1: Machine Panel * **Hover over the indicator dot**: Shows detailed status information * **View metrics**: Uptime, CPU usage, memory usage * **Real-time updates**: Status updates automatically every 10 seconds Machine Status Panel #### Method 2: Bottom Left Icon * **Hover over machine icon**: Quick status overview * **Visual indicator**: Colored dot matches the states above * **Easy access**: Always visible in workspace Bottom Left Status Icon ## Step 4: Stop Machine ### Stop Process 1. **Click "Stop Machine"**: Click the white button in machine panel 2. **Immediate Stop**: Machine stops running immediately 3. **No Compute Cost**: No charges after stopping ### Benefits of Stopping * **Save Resources**: Stop when not actively using * **Cost Control**: No charges when stopped * **Quick Restart**: Can restart anytime needed Stop Machine Button ## Best Practices ### Machine Selection * **Start Small**: Begin with CPUx3 for simple analysis * **Scale Up**: Upgrade to larger machines for complex tasks * **GPU for ML**: Use GPU machines for machine learning workloads * **Cost Consideration**: Larger machines consume more resources ### Resource Management * **Stop When Done**: Stop machines when not actively working * **Monitor Usage**: Check status regularly * **Plan Sessions**: Start machines when ready to work ## Next Steps Now that your machine is running: 1. **Start Coding**: Begin your analysis in the notebook 2. **Load Data**: Access your workspace files 3. **Use GPU**: Leverage GPU acceleration if available 4. **Monitor Performance**: Keep an eye on resource usage Happy computing! # Supported Python Libraries Source: https://docs.nikaplanet.com/guides/data-analysis/supported-python-libraries Learn about the Python libraries supported in NikaWorkspace for data analysis and geospatial processing NikaWorkspace supports almost all open-source Python libraries as long as Jupyter supports them. You can install any library you need using `!pip install` in code blocks. ## Step 1: Installing Libraries ### Using pip install ```python theme={null} # Install any library you need !pip install library_name # Example installations !pip install pandas numpy matplotlib !pip install scikit-learn tensorflow !pip install geemap leafmap ``` ### Installation Process 1. **Run Installation**: Execute the pip install command in a code cell 2. **Wait for Installation**: Installation completes automatically 3. **Restart Kernel**: Restart kernel if needed for some libraries 4. **Import and Use**: Import and use the library in subsequent cells ## Step 2: Popular Libraries ### Data Analysis * **pandas**: Data manipulation and analysis * **numpy**: Numerical computing * **scipy**: Scientific computing * **scikit-learn**: Machine learning ### Geospatial Libraries * **geemap**: Google Earth Engine integration * **leafmap**: Interactive mapping * **geopandas**: Geospatial data analysis * **rasterio**: Raster data processing * **folium**: Interactive maps * **pyproj**: Coordinate transformations ### Machine Learning * **tensorflow**: Deep learning framework * **pytorch**: Machine learning library * **xgboost**: Gradient boosting * **lightgbm**: Light gradient boosting ### Visualization * **matplotlib**: Basic plotting * **seaborn**: Statistical visualization * **plotly**: Interactive plots * **bokeh**: Interactive visualization ## Step 3: Geospatial Libraries ### Earth Engine Integration ```python theme={null} # Install and use geemap !pip install geemap import geemap import ee # Initialize Earth Engine ee.Initialize() # Create a map Map = geemap.Map() Map.addLayer(ee.Image('USGS/SRTMGL1_003'), {}, 'SRTM') Map ``` ### Interactive Mapping ```python theme={null} # Install and use leafmap !pip install leafmap import leafmap # Create interactive map m = leafmap.Map() m.add_basemap('OpenStreetMap') m ``` ### Geospatial Analysis ```python theme={null} # Install and use geopandas !pip install geopandas import geopandas as gpd # Load geospatial data gdf = gpd.read_file('/workspace/data/shapefile.shp') gdf.plot() ``` ## Step 4: Machine Learning Libraries ### Deep Learning ```python theme={null} # Install and use TensorFlow !pip install tensorflow import tensorflow as tf print(f"TensorFlow version: {tf.__version__}") # Check GPU availability print(f"GPU available: {tf.config.list_physical_devices('GPU')}") ``` ### Traditional ML ```python theme={null} # Install and use scikit-learn !pip install scikit-learn from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split # Train model model = RandomForestClassifier() model.fit(X_train, y_train) ``` ## Step 5: Data Visualization ### Static Plots ```python theme={null} # Install and use matplotlib/seaborn !pip install matplotlib seaborn import matplotlib.pyplot as plt import seaborn as sns # Create plots plt.figure(figsize=(10, 6)) sns.scatterplot(data=df, x='x', y='y') plt.show() ``` ### Interactive Plots ```python theme={null} # Install and use plotly !pip install plotly import plotly.express as px # Create interactive plot fig = px.scatter(df, x='x', y='y', color='category') fig.show() ``` ## Step 6: Specialized Libraries ### Image Processing * **opencv-python**: Computer vision * **PIL/Pillow**: Image processing * **scikit-image**: Image processing ### Statistical Analysis * **statsmodels**: Statistical modeling * **pingouin**: Statistical testing * **scipy.stats**: Statistical functions ### Database Integration * **sqlalchemy**: Database ORM * **psycopg2**: PostgreSQL adapter * **pymongo**: MongoDB driver ### Cloud Services * **boto3**: AWS SDK * **google-cloud-storage**: Google Cloud * **azure-storage-blob**: Azure Storage ## Step 7: Library Management ### Version Management ```python theme={null} # Check installed versions !pip list # Install specific versions !pip install pandas==1.5.3 # Upgrade libraries !pip install --upgrade library_name ``` ### Environment Management * **Automatic Installation**: Libraries install automatically * **Version Compatibility**: System handles version conflicts * **Dependency Resolution**: Automatic dependency management * **Clean Environment**: Fresh environment for each session ### Best Practices * **Install as Needed**: Install libraries when you need them * **Check Compatibility**: Verify library compatibility * **Use Virtual Environments**: Consider virtual environments for complex setups * **Document Dependencies**: Keep track of required libraries ### Enterprise Feature: Library Persistence (Coming Soon) * **Persistent Libraries**: Enterprise users can persist libraries across kernel sessions * **GUI Management**: Manage persistent libraries through a user-friendly interface * **Custom Environments**: Create and maintain custom library environments * **Contact Support**: Email support request for early access to this feature ## Step 8: Troubleshooting ### Common Issues * **Installation Fails**: Check library name and internet connection * **Import Errors**: Restart kernel after installation * **Version Conflicts**: Install compatible versions * **Memory Issues**: Use smaller libraries or optimize code ### Solutions * **Restart Kernel**: Often resolves import issues * **Check Documentation**: Verify installation instructions * **Alternative Libraries**: Use alternative libraries if needed * **Contact Support**: Get help for persistent issues ### Performance Tips * **Lazy Loading**: Import libraries only when needed * **Memory Management**: Monitor memory usage * **Efficient Libraries**: Use efficient library alternatives * **Caching**: Cache results to avoid recomputation ## Next Steps Now that you know about supported libraries: 1. **Install Libraries**: Start installing the libraries you need 2. **GDAL Setup**: GDAL is pre-installed — no setup required 3. **Run Code**: [Run Code in Notebook](/guides/data-analysis/run-code-in-notebook) with your libraries 4. **Publish**: [Publish Your Notebook](/guides/data-analysis/publish-notebook) with your analysis Happy coding! # Create New Flow Source: https://docs.nikaplanet.com/guides/data-conversion-pipeline/create-new-flow Learn how to create a new data conversion workflow and add nodes ## Opening the Workflow Panel To create a new data conversion workflow: 1. Navigate to the **Workflows** section in the left panel 2. Click the **+** button next to the search bar, or 3. Click the **New Workflow** button on the right side of the main content area Create New Workflow Interface ## Adding Nodes to Your Workflow Once you've created a new workflow, you can add different types of nodes: 1. Click the **Add Node** button at the top of the workflow canvas 2. Select from the available node types: * **Add Input** - For specifying data sources * **Add Conversion** - For data format transformations * **Add Output** - For defining output destinations Add Node Options ## Connecting Nodes After adding nodes to your workflow: 1. Click and drag from the output port (right side) of one node 2. Connect it to the input port (left side) of another node 3. This creates a data flow connection between the nodes The workflow canvas will show your connected nodes with visual connections indicating the data flow path. # Edit Conversion Flow Source: https://docs.nikaplanet.com/guides/data-conversion-pipeline/edit-conversion-flow Configure input, conversion, and output nodes for your data pipeline ## Configuring Input Nodes ### Setting Input Sources 1. Click on an **Input Data** node to open its configuration panel 2. In the **Include Paths** section, add your data source paths: * All paths **must start with `/data/`** prefix * Use wildcards (e.g., `/data/*.tif`) to include multiple files * Add paths one at a time * Double click an existing path to modify the text Input Node Configuration ### Using Exclude Paths To refine your input scope: 1. In the **Exclude Paths (Optional)** section, specify files to exclude 2. This is useful when using wildcards - you can include a broad pattern and then exclude specific unwanted files 3. Example: Include `/data/cwdz02/*.wd2` but exclude `/data/cwdz02/000casdas.wd2` Wildcard Include with Exclude Paths ### \[Advanced] Drag and Drop from Files Panel For faster path entry: 1. Open the **Files** panel on the left 2. Select multiple files from the data lake filesystem 3. Drag and drop them directly into the input node panel's dropzone 4. This automatically adds all selected file paths that are valid for currently selected input data format Drag and Drop Files ## Configuring Conversion Nodes ### Setting Input and Output Formats 1. Click on a **Format Conversion** node 2. Configure the conversion parameters: * **Input Type** - Select the data type (Vector, Raster, etc.) * **Input Format** - Choose the source format (GeoJSON, KML, etc.) * **Output Type** - Select the target data type * **Output Format** - Choose the destination format (KMZ, Shapefile, etc.) 3. Check out [NikaFlow page](/nika-planet/nika-flow#geospatial-format-support) for latest supported input and output data type/formats Conversion Node Configuration ## Configuring Output Nodes ### Setting Output Destination 1. Click on an **Output Data** node 2. The **Data Type** and **Format** will automatically sync with the connected conversion node 3. Optionally set an **Output Folder Path**: * Must start with `/data/` and end with `/` * If left empty, outputs will be saved in the same folder as each source file Output Node Configuration # Execute and Verify Pipeline Source: https://docs.nikaplanet.com/guides/data-conversion-pipeline/execute-and-verify-pipeline Run your data conversion workflow and monitor execution status ## Running Your Workflow ### Starting the Workflow 1. Once your workflow is configured with input, conversion, and output nodes, click the **Run Workflow** button in the top-right corner 2. The system will begin processing your data according to the workflow configuration Run Workflow Button ## Monitoring Execution ### Run History After starting the workflow: 1. Check the **Run History** section in the workflow overview panel 2. You'll see entries showing: * Execution start time and date * Workflow status (started, completed, failed) * Node and edge count (e.g., "3n/2e" for 3 nodes and 2 edges) ### Real-time Updates * The UI updates progressively every 10 seconds during execution * Monitor the status in the Run History section * Watch for any error messages or warnings ## Handling Errors and Warnings ### Error Detection If there are issues with your workflow configuration: 1. The system will display a warning panel showing the number of issues found 2. Each issue will be clearly explained with specific details 3. Common issues include: * Invalid file extensions for specified formats * Missing required configuration fields * Invalid file paths Error Detection and Warnings ### Fixing Issues 1. Review the error messages carefully 2. Check that file extensions match the expected format (e.g., `.geojson` for GeoJSON files) 3. Verify that all required fields are properly configured 4. Make necessary corrections and re-run the workflow ## Workflow Overview The workflow overview panel provides a summary of your pipeline: * **Inputs** - Lists all input nodes and their configurations * **Conversions** - Shows conversion nodes and their transformations * **Outputs** - Displays output nodes and their destinations This overview helps you verify that your workflow is properly configured before execution. # Connect to MotherDuck Source: https://docs.nikaplanet.com/guides/database-management/connect-motherduck Connect to MotherDuck cloud database service Connect to MotherDuck for cloud-native DuckDB with serverless architecture. ## Step 1: Add MotherDuck Connection 1. Navigate to **Database Management** 2. Click **"Add External Database"** 3. Select **"MotherDuck"** from the database types ## Step 2: Create MotherDuck Access Token 1. Go to [https://app.motherduck.com/settings/tokens](https://app.motherduck.com/settings/tokens) after login, to create a new access token 2. Copy the value of the new token Connect MotherDuck Step 1 ## Step 3: Configure MotherDuck 1. **Service Token**: Your MotherDuck service token 2. **Database Name**: Target database (optional) 3. **Region**: Select your preferred region 4. Click **"Test Connection"** Connect MotherDuck Step 2 ## Step 3: Save Connection 1. Verify connection status shows **"Connected"** 2. Click **"Save Connection"** 3. Your MotherDuck database is now available for queries MotherDuck provides serverless DuckDB with automatic scaling and built-in spatial support. # Connect to PostgreSQL Source: https://docs.nikaplanet.com/guides/database-management/connect-postgres Connect to external PostgreSQL databases like Supabase Connect to external PostgreSQL databases including Supabase for spatial data analysis. ## Step 1: Add Database Connection 1. Go to **Database Management** 2. Click **"Add External Database"** 3. Select **"PostgreSQL"** from the database types ## Step 2: Get Connection String from your Postgres Database 1. Go to your database provider such as [Supabase](https://supabase.com/) in this example 2. Creacte new or select an existing postgres database project 3. Click `Connect` at its top bar 4. Copy the value of the session pool url and replace the password placeholder with your actual password Connect PostgreSQL Step 2-1 Connect PostgreSQL Step 2-2 ## Step 3: Enter Connection String in Creation Connection Dialog 1. **Host**: Your PostgreSQL server address 2. **Port**: Default 5432 (or your custom port) 3. **Database**: Target database name 4. **Username**: Your database username 5. **Password**: Your database password 6. **SSL Mode**: Required for Supabase connections Connect PostgreSQL Step 3 ## Step 4: Test and Save Click **"Save Connection"** For Supabase, use your project's connection string and ensure SSL is enabled. # Create Managed DuckDB Source: https://docs.nikaplanet.com/guides/database-management/create-managed-duckdb Set up a new managed DuckDB instance for spatial SQL queries Create a new DuckDB instance managed by Nika for high-performance spatial data analysis. ## Step 1: Access Database Management 1. Navigate to **Database Management** in your NikaWorkspace 2. Click **"Create New Database"** 3. Select **"Managed DuckDB"** from the database types Create Managed DuckDB Step 1 ## Step 2: Configure Database 1. Enter a **database name** (e.g., "spatial\_analysis") 2. Choose **storage location** (Nika cloud or local) 3. Enable **spatial extensions** for geospatial functions 4. Click **"Create Database"** Create Managed DuckDB Step 2 ## Step 3: Verify Creation Your new managed DuckDB instance is ready for spatial SQL queries with built-in geospatial functions. Managed DuckDB instances include spatial extensions by default and support direct file querying from your workspace. # Query Managed DuckDB Source: https://docs.nikaplanet.com/guides/database-management/query-managed-duckdb Execute SQL queries using built-in editor or AI generation Execute spatial SQL queries on your managed DuckDB instance using the built-in query editor or AI assistance. ## Step 1: Open Query Editor 1. Click `Databases` in the left bar of a NikaWorkspace 2. Select a **managed DuckDB** from the database list 3. Double click or right click to select **"Open SQL Query Editor"** 4. The query interface opens with your database context ## Step 2: Open Query Editor 1. Click `Files` in the left bar 2. Right click on a spatial file of your interest to `Copy Path` Query Managed DuckDB Step 1 ## Step 3: Write SQL Query ### Manual SQL Writing 1. Type your spatial SQL query in the editor of a NikaWorkspace 2. Use spatial functions from DuckDB SQL like `ST_READ()`, `ST_AsText()`, `ST_DWithin()` 3. Click **"Execute"** to run the query Query Managed DuckDB Step 2 ### AI-Powered SQL Generation 1. \[Optional] Select AI model (GPT-4, Claude, etc.) 2. Describe your query in natural language 3. Click **"Generate SQL"** button 4. AI generates SQL based on your table schema Query Managed DuckDB Step 3 ## Step 4: View Results 1. Query results display in the results table 2. **Download CSV** for data export 3. **Add to Map** to visualize spatial results (WIP) AI SQL generation understands your table schema if you mention it with '/' trigger and suggests optimal spatial queries for your data. Query Managed DuckDB Step 4 # Conducting AI-Supported Field Surveys Source: https://docs.nikaplanet.com/guides/field-survey/ai-audio-gps Learn how to conduct an environmental field survey using NikaField's voice-to-form AI, offline audio transcription, and GPS tracking. This guide will walk you through setting up and executing a survey using **NikaField**. You will learn how to leverage on-device AI for seamless voice-to-form auto-population while tracking your movement with integrated GPS. ## Prerequisites * **NikaField Application** installed on your mobile device. * Pre-configured survey plans and schemas on your Nika dashboard. ## Step 1: Selecting the Survey When you arrive at the survey site, open NikaField. You'll land on your **Survey List**. 1. Locate the correct site from your synchronized plans. 2. Tap on the desired survey to view the designated target nodes and tasks. Survey List ## Step 2: Utilizing the GPS Trail It's critical for methodologies like Biodiversity Net Gain (BNG) walks and bat transects to have proof-of-coverage. 1. Within the survey view, switch to the map tab to see your **GPS Trail**. 2. Start walking your transect or plot. NikaField logs your pathway, allowing you to easily view the exact coverage you've completed for QA evidence. GPS Trail ## Step 3: Entering a Session and Using Voice AI Instead of manually navigating through 15+ form fields, you can use NikaField's offline, on-device AI to transcribe and organize your observations automatically. 1. Create a new **Survey Session** for the current subplot or feature. 2. Tap the **Audio Mode** button to begin recording. 3. Simply speak your observations naturally. For example: *"The broad habitat is grassland, specifically poor semi-improved. Scattered scrub covers about 15% of the area..."* Survey Session ### On-Device Transcription Once you stop recording, NikaField immediately processes your speech into text. Because this uses an on-device model, **no internet connection is required**. Audio Transcript ## Step 4: AI Auto-Fill After the transcription is complete, click the AI Auto-Fill action. 1. The built-in AI assistant automatically maps your spoken sentences to the corresponding fields in your compliance schema. 2. Review the structured data—habitat type, coverage percentage, species counts, etc. have all been placed in their correct fields. 3. Make any minor adjustments if necessary, then save the session. AI Auto-Fill ## Summary By leveraging Voice-to-Form AI and offline speech-to-text, you drastically reduce time spent typing on small screens. NikaField ensures your data stays organized, compliant, and spatially accurate with full GPS transparency. # Assign a Labeling Job Source: https://docs.nikaplanet.com/guides/image-labeling/assign-labeling-job Learn how to assign labeling jobs to team members and manage annotation workflows Learn how to assign your created labeling jobs to team members and manage the annotation workflow effectively. Assign Labeling Job ## Step 1: Add Collaborators to Your Workspace Before you can assign a labeling job to team members, you need to ensure they have access to your workspace. This requires two steps: ### Add People to Your Team First, invite users to your team by following the [Invite to Team](/guides/access-control/invite-to-team) guide. This adds them to your organization's team. ### Grant Workspace Access with EDITOR Permissions Next, give team members access to the specific workspace containing your labeling job. Follow the [Invite to Workspace](/guides/access-control/invite-to-workspace) guide and make sure to assign them **EDITOR** access. Only users with EDITOR access can be assigned as labelers or reviewers. ## Step 2: Assign Users to the Labeling Job Once your team members have EDITOR access to the workspace, you can assign them to the labeling job. Assign User to Job You can assign: * **Yourself** as the labeler * **Other team members** who have EDITOR access to the workspace After making an assignment, the job status will automatically update from **UNASSIGNED** to **ANNOTATING**. ## Step 3: Manage Existing Assignments Each assigned user has management options available on the right side of their assignment entry. Manage Assignment You can: * **Switch Role**: Click the switch icon to toggle between **Labeler** and **Reviewer** roles * **Remove Assignment**: Click the trash icon to remove the user from this job ## Step 4: Add More Assignments with Different Roles You can assign multiple users to the same job with different roles using the select dropdown. Add More Assignments Use the dropdown to: * Assign additional labelers to distribute the workload * Assign reviewers to quality-check annotations * Mix roles as needed for your workflow Once a user is assigned a role to this job, one can click the **play button** to start the labeling or reviewing task from the first image. Happy labeling! # Create a Labeling Job Source: https://docs.nikaplanet.com/guides/image-labeling/create-labeling-job Learn how to create an image labeling job, configure modes, and set up instructions for your team Learn how to create a new labeling job in Nika Labeler, switch between labeling modes, and configure instructions that your team members will see when working on annotations. ## Step 1: Create a New Labeling Job 1. **Navigate to Nika Labeler**: In NikaWorkspace, click on the Labeler icon in the left sidebar 2. **Create New Job**: Click the "+" button to create a new labeling job 3. **Configure Job Settings**: Set up your job name and initial configuration Create Labeling Job ## Step 2: Switch Between Labeling Modes Nika Labeler supports different labeling modes to accommodate different annotation workflows. You can easily switch between modes using the switch. Switch Labeling Modes ### Available Labeling Modes * **Classification Mode**: For categorizing entire images with 1 or more classes * **Segmentation Mode**: For bounding box, polygon, linestring drawing on images with associated classes Note: you can still switch mode after images are uploaded. However, all existing annotations will be gone. ## Step 3: Edit Job Instructions Clear instructions are essential for consistent annotations. Set up detailed guidance that assignees will reference while labeling. 1. **Click Edit Instructions**: Click the instruction editor button to open the instruction panel Edit Instructions Button 2. **Write Clear Guidelines**: Provide detailed instructions for your labeling task * Describe what to annotate * Include examples of edge cases * Specify quality standards * Add any project-specific requirements 3. **Save Instructions**: Click "✅" to finalize your instructions Save Instructions After saving, your instructions will be visible to assignees in the right panel's annotations tab. This ensures they have constant access to guidelines while working. Assignee View of Instructions ## Step 4: Add Images to Your Labeling Job Now that your job is configured with instructions, it's time to add the images that need to be labeled. Nika Labeler provides two convenient ways to add images to your job. Add Images to Job ### Method 1: Drag and drop from Nika File Storage 1. **Open File Storage**: Access your files from the left sidebar in NikaWorkspace 2. **Select Files or Folders**: Choose the images or folders containing images you want to label 3. **Drag to Images Section**: Drag and drop the selected files or folders directly to the images section of your labeling job This method is ideal when your images are already uploaded to Nika's cloud storage. ### Method 2: Drag and drop from Desktop 1. **Locate Files on Desktop**: Find the images on your local computer 2. **Drag Directly**: Drag the files from your desktop (or any local folder) directly to the images section 3. **Upload Automatically**: The files will be uploaded and added to your labeling job automatically This method is perfect for quickly adding new images without pre-uploading them to Nika File Storage. ## Job Ready for Assignment Your labeling job is now configured and ready to be assigned to team members! The job includes: ✅ Configured labeling mode\ ✅ Clear instructions for assignees\ ✅ Proper setup for consistent annotations Happy labeling! # Edit Labeling Classes Source: https://docs.nikaplanet.com/guides/image-labeling/edit-labeling-classes Learn how to add, edit, and manage labeling classes for your annotation jobs Learn how to manage labeling classes in your annotation jobs, including adding new classes, editing existing ones, and protecting classes from accidental changes. ## Step 1: Add a New Class Use the bottom of the labeler right panel to add new class entries. Add New Class When adding a class, you can specify: * **Class Name**: The name of the annotation class * **Super Class** (optional): Used to group classes of the same family together for certain model training purposes ## Step 2: Edit or Remove a Class Once a class is created, you have options to manage it. Edit or Remove Class For each class, you can: * **Edit**: Click the edit button to enter edit mode * **Remove**: Click the trash button to remove this class **Note**: Removing a class will also remove all associated annotations with this class. ## Step 3: Modify Class Properties When in edit mode, you can modify various properties of the class. Edit Class Properties You can modify: * **Class Name**: Change the name of the class * **Super Class Name**: Update or add a super class grouping * **Class Color**: Adjust the color used to display this class in annotations After making changes: * Click the **✓** (tick emoji) to save your changes * Click the **✕** (cross emoji) to cancel changes ## Step 4: View Associated Annotations Each class displays the number of annotations associated with it. View Annotation Count This helps you track which classes are being used and how extensively they've been annotated. ## Step 5: Lock Classes to Prevent Changes Users of the workspace can click the lock button to lock/unlock class edits to protect against mistaken changes. Lock Classes When classes are locked: * Other users cannot make edits to existing classes * Other users cannot remove existing classes in this job * This protects your class structure from accidental modifications Happy labeling! # Import and Export Classes/Annotations Source: https://docs.nikaplanet.com/guides/image-labeling/import-export-formats Learn how to import and export annotation data in various formats Learn how to import existing classes/annotations and export your completed labeling work in industry-standard formats. ## Supported Formats Nika Labeler supports various annotation formats for import and export: * **COCO 1.0 JSON** (Currently supported) * YOLO format (To be confirm) * Pascal VOC XML (To be confirm) * LabelMe JSON (To be confirm) * Custom JSON formats (To be confirm) ## Step 1: Import Annotations To import existing annotations into your labeling job, use the import dropzone. Import Annotations You can import annotations by: * **Click the dropzone**: Click to open a file browser and select your annotation file * **Drag and drop**: Drop a file from your desktop directly to the dropzone ## Step 2: Resolve Import Conflicts Once the file is validated successfully, a dialog will appear for resolving conflicts before the import. Resolve Conflicts In the conflict resolution dialog, you can: * **Merge conflicting classes**: Combine classes with similar names * **Rename classes**: Adjust class names to match your existing schema * **Select classes**: Click on classes to choose whether to include or ignore them * **Select images**: Click on images to choose whether to include or ignore them After reviewing and resolving conflicts, click the **"Proceed"** button to finalize the import. ## Step 3: Export Annotations Once you have completed annotating images in this job, you can export the existing job via the download button. Export Annotations Click the download button in the top right to export your annotations in the selected format. Happy labeling! # Label on Images Source: https://docs.nikaplanet.com/guides/image-labeling/label-on-images Learn how to annotate images using various drawing tools and keyboard shortcuts Learn how to annotate images efficiently using drawing tools, keyboard shortcuts, and smart segmentation features. ## Step 1: Enter Drawing Mode Double click on an image to enter drawing mode on that image. Drawing Mode with Keyboard Shortcuts ### Keyboard Shortcuts The following keyboard shortcuts are available to speed up your annotation workflow: #### Navigation | Shortcut | Action | | - | - | | `A` | Previous image | | `D` | Next image | #### Class Selection (Segmentation Mode Only) | Shortcut | Action | | - | - | | `1-9` | Select class 1-9 | #### Drawing Tools | Shortcut | Action | | - | - | | `S` | Pan tool | | `Q` | Bounding Box tool (Segmentation mode) | | `W` | Polygon tool (Segmentation mode) | | `E` | Polyline tool (Segmentation mode) | | `R` | Mask tool (To be confirmed) | | `F` | Point Marker (To be confirmed) | | `X` | Smart Segmentation | | `C` | Comment tool | #### Actions | Shortcut | Action | | - | - | | `⌘Z` | Undo | | `⌘⇧Z` | Redo | | `Enter` | Finish drawing / Accept (Segmentation mode) | | `Esc` | Cancel / Reset to Pan | | `Backspace` | Delete selected annotation (Segmentation mode) | ## Step 2: Switch Between Classes In segmentation jobs, you can click the dropdown at top right of the drawing page to switch between classes for your current annotation. Switch Class Dropdown This allows you to quickly change the class you're annotating without interrupting your workflow. ## Step 3: Draw Polygons In polygon mode, you can create precise annotations by clicking to add points. Polygon Drawing Mode To draw a polygon: * **Click** to add a point * **Double click** or **click again on an existing node** to finalize the polygon drawing ## Step 4: Use Smart Segmentation Nika's smart segmentation tool uses SAM 2.0 from Meta for quick segmentation of parts of the image. Smart Segmentation Tool With smart segmentation, you can: * Define the number of polygons allowed before finalizing * Adjust the complexity/smoothness of boundary segmented * Quickly segment complex objects with AI assistance * Refine the generated polygons as needed ## Step 5: Submit for Review Once you've finished annotating all images, you can submit your work for review. Submit for Review As a user assigned the labeler role: 1. Go back to the job page 2. Click the top right status select dropdown 3. Select **Submit for Review** Happy labeling! # Review Existing Annotations Source: https://docs.nikaplanet.com/guides/image-labeling/review-existing-annotations Learn how to review annotations, add comments, and approve or reject labeling work Learn how to review annotations as a reviewer, provide feedback through comments, and approve or reject completed labeling work. ## Step 1: Add Comments During Review A reviewer role can add comments with different severity levels for labelers to see in real time and reply. Add Comment on Image To add a comment: 1. Click the comment button on the right 2. Click anywhere on the image to drop a comment there Comment levels available: * **INFO**: General information or suggestions * **WARNING**: Issues that should be addressed * **ERROR**: Critical problems that must be fixed ## Step 2: Manage Issues in the Right Panel The labeler right panel displays a list of all issues (comments) added to the current image. Issues List in Right Panel Users can: * **Reply**: Other users can reply to issues for discussion * **Resolve**: Mark an issue as resolved once addressed * **Remove**: Issue owner can remove an issue entirely from the job ## Step 3: Filter and View Resolved Issues Use the filter at the top right to control which issues are displayed. Filter Issues The filter allows you to: * **Show all issues**: View both open and resolved issues * **View resolved issues**: See previously resolved issues * **Reopen issues**: Reopen resolved issues for further actions if needed ## Step 4: Approve or Reject the Job Once you've finished reviewing all images, you can approve or reject the job overall. Approve or Reject Job As a reviewer: 1. Go back to the job overview page 2. Click **Reject** or **Approve** at the top right This completes the review cycle and notifies the labeler of the outcome. Happy labeling! # Download Files and Folders Source: https://docs.nikaplanet.com/guides/manage-file-lake-per-workspace/download-files-and-folders Learn how to download files and folders from your workspace's file storage You can download individual files, multiple files, or entire folders from the File Storage panel. ## Download Files 1. **Select files**: Click a file to select it, or hold **Cmd** (Mac) / **Ctrl** (Windows) and click to select multiple files 2. **Right-click**: Right-click on any of the selected files 3. **Click "Download"**: Choose "Download" from the context menu Each selected file will be downloaded individually to your computer. Download Files ## Download a Folder 1. **Right-click** on the folder you want to download 2. **Click "Download"**: Choose "Download" from the context menu The folder and all its contents will be automatically zipped and downloaded as a `.zip` file. Download Folder Folders past about 2 GB cannot be zipped in the browser. Nika Planet detects this and offers the **Nika Planet Downloader** instead — see [Large Folder Downloads](/guides/manage-file-lake-per-workspace/large-folder-downloads). For very large one-off migrations, our data migration team can help — [book a call](https://cal.com/lawrence-nika/export-20-gb-files-from-nika.eco) or email [support@nikaplanet.com](mailto:support@nikaplanet.com). # How to Download Large Folders from Nika Planet Source: https://docs.nikaplanet.com/guides/manage-file-lake-per-workspace/large-folder-downloads Install the Nika Planet Downloader to transfer folders over 2 GiB or 2,000 files, resume interrupted downloads, and verify each file. Browsers download a folder by building the whole ZIP in memory before anything reaches your disk. Folders over 2 GiB or 2,000 files can stall, and there is no way to resume — so Nika Planet hands folders past either limit to a small terminal tool instead. The **Nika Planet Downloader** writes straight to the drive you choose, transfers files in parallel, resumes where it left off, and verifies every file against the checksum storage reports. The web app sends large **folders** to the downloader. Individual file selections continue to use the normal browser download, even when a file is large. The downloader transfers the objects inside each selected folder individually; you can also run it directly for folders without starting from the web app.
## Install One install covers every export, in any workspace. With [Homebrew](https://brew.sh): ```bash theme={null} brew install nikageospatial/nika-planet-downloader/nika-planet-downloader ``` It is ready to use as soon as the command finishes. `brew upgrade nika-planet-downloader` picks up new versions. No Homebrew? Use the install script instead: ```bash theme={null} curl -fsSL https://raw.githubusercontent.com/NikaGeospatial/nika-planet-downloader/main/install.sh | sh ``` The script adds the downloader to your `PATH`, so **open a new terminal window** before running it. Run the script again to update. In PowerShell: ```powershell theme={null} irm https://raw.githubusercontent.com/NikaGeospatial/nika-planet-downloader/main/install.ps1 | iex ``` It installs to `%LOCALAPPDATA%\Programs\nika-planet-downloader` and adds that folder to your `PATH` — no administrator rights needed — and the window you ran it in can use the downloader straight away. Rather not paste a command? Download [`install.cmd`](https://github.com/NikaGeospatial/nika-planet-downloader/releases/latest/download/install.cmd) and double-click it, then **open a new PowerShell window** to use the downloader. It is not code-signed yet, so Windows may ask you to confirm before it runs. Run either one again to update. 64-bit Windows only; on Windows on Arm the x64 build runs under emulation. ```bash theme={null} curl -fsSL https://raw.githubusercontent.com/NikaGeospatial/nika-planet-downloader/main/install.sh | sh ``` The script adds the downloader to your `PATH`, so **open a new terminal window** before running it. Run the script again to update. x86\_64 only for now. ## Download a folder Point the tool at a folder using a `nikafs://` address: ```bash theme={null} nika-planet-downloader export 'nikafs:///data/stac/cogs' --output ~/Downloads ``` ```powershell theme={null} nika-planet-downloader export 'nikafs:///data/stac/cogs' --output "$HOME\Downloads" ``` Write the output folder as `"$HOME\Downloads"` rather than `~/Downloads`: Windows PowerShell passes `~` to programs unchanged, so the download would land in a folder literally named `~`. ```bash theme={null} nika-planet-downloader export 'nikafs:///data/stac/cogs' --output ~/Downloads ``` You do not need to sign in first. If no session is cached, the command opens your browser once, and continues into the download as soon as you have authorised it. **`--output` is the parent directory.** The folder structure from Nika Planet is recreated inside it, so `--output ~/Downloads` saves the example above to `~/Downloads/stac/cogs` (on Windows, `--output "$HOME\Downloads"` saves it to `Downloads\stac\cogs` in your user folder). Passing `--output ~/Downloads/stac` would give you `~/Downloads/stac/stac`. ### Finding the address The `nikafs://` address is your project id followed by the folder path: 1. **Project id** — the UUID in the workspace URL while the project is open 2. **Folder path** — right-click the folder in File Storage and choose **Copy Path**, which gives you something like `/data/stac/cogs/` Join them: `nikafs:///data/stac/cogs` Addresses do not expire. Keep one in a script or runbook and it will keep working for as long as you have access to that folder. ### Several folders at once Pass as many addresses as you like. They may span different projects. ```bash theme={null} nika-planet-downloader export \ 'nikafs:///data/stac/cogs' \ 'nikafs:///data/imagery/2024' \ --output ~/Downloads ``` ```powershell theme={null} nika-planet-downloader export ` 'nikafs:///data/stac/cogs' ` 'nikafs:///data/imagery/2024' ` --output "$HOME\Downloads" ``` ```bash theme={null} nika-planet-downloader export \ 'nikafs:///data/stac/cogs' \ 'nikafs:///data/imagery/2024' \ --output ~/Downloads ``` ### Starting from the web app If you select folders in File Storage and choose **Download**, anything too large for the browser collapses into a single row in Active Operations. Click **Download via CLI** for a dialog with the install command and the exact export command already filled in. It shows the commands for the operating system you are on; switch between **macOS**, **Windows** and **Linux** at the top if you are setting up another machine. Copy them and run them. ## Options | Flag | Default | What it does | | - | - | - | | `--output` | required | Parent directory for the download | | `--concurrency` | `4` | Files transferred at once. Raise it if your connection is not saturated | | `--force` | off | Re-download files even when a verified local copy exists | | `--dry-run` | off | List what would transfer, then stop | The flags above are the ones you are likely to reach for; run `nika-planet-downloader export --help` for the full list. ## Resuming Press **Ctrl-C** at any point. Partly-transferred files are kept as `.nikapart` files, and re-running the identical command picks up where it stopped. Files that already finished are skipped after a size check, so repeating a command is cheap and safe. ## Other commands ```bash theme={null} nika-planet-downloader login # sign in ahead of time nika-planet-downloader whoami # show the current sign-in state nika-planet-downloader logout # forget the cached session on this machine ``` ## Access and privacy The tool signs in as **you**. It can only download what your own Nika Planet account is already allowed to download, and that permission is re-checked on every request — so if your workspace access changes, an in-progress download stops. Read access is granted one hour at a time and can be revoked. Your session is stored in your operating system's credential store — the Keychain on macOS, Credential Manager on Windows — never in a file. ## If something goes wrong Open a new terminal window. The installer added the downloader to your `PATH`, and windows that were already open do not see the change. You ran `export` with no address. Pass a `nikafs://` address, or start a download from the web app and use **Download via CLI**. The path is wrong or the folder is empty. Re-copy it with **Copy Path** and check the project id matches the workspace the folder is in. Your access to that project changed. Ask a workspace owner to confirm you are still a contributor or above. Re-run the identical command. Only the files that failed are retried; everything already downloaded is skipped. Earlier versions of the downloader opened the sign-in page on Windows without the details it needs. Re-run the Windows install command to update, then sign in again. Smart App Control, which is on by default on new Windows 11 installations, blocks programs it does not recognise yet, and the downloader is not code-signed. Windows offers no way to allow a single program past it, so run the downloader on another computer, or contact us below. Windows does not run downloaded PowerShell scripts that way. Use `install.cmd`, or paste the `irm … | iex` command from the Windows install tab into PowerShell. Still stuck? Email [support@nikaplanet.com](mailto:support@nikaplanet.com), or [book a call](https://cal.com/lawrence-nika/export-20-gb-files-from-nika.eco) for help with very large migrations. # Monitor File Storage Source: https://docs.nikaplanet.com/guides/manage-file-lake-per-workspace/monitor-file-storage Learn how to monitor storage usage per workspace and across your team NikaPlanet provides several ways to monitor how much file storage your team is using. ## Check Storage in a Workspace At the bottom of the File Storage panel in any workspace, you can see the total storage available for your organization. Workspace Storage Indicator ## Check Storage Across All Workspaces For a detailed breakdown of storage usage across all workspaces under your team: 1. Go to **Settings** → **Usage** ([planet.nika.eco/en/settings/usage](https://planet.nika.eco/en/settings/usage)) 2. Select the correct team from the team switcher on the left sidebar 3. Click the **Storage** tab Select Team in Settings This view shows storage used per workspace, including object counts, storage size, and percentage distribution. Team Storage Usage Details ## Check Your Current Plan To see the storage quota included in your current plan: 1. Go to **Settings** → **Billing** ([planet.nika.eco/en/settings/billing](https://planet.nika.eco/en/settings/billing)) 2. Select the correct team from the team switcher on the left sidebar 3. Review the **Storage** line item showing your plan's total allocation Billing Plan Storage ## Upgrade Storage If you need more storage, you can: * **Book a call with our sales team**: [cal.com/lawrence-nika/nika-expert](https://cal.com/lawrence-nika/nika-expert) * **Email support**: [support@nikaplanet.com](mailto:support@nikaplanet.com) # Organize Files and Folders Source: https://docs.nikaplanet.com/guides/manage-file-lake-per-workspace/organize-files-and-folders Learn how to move and organize files and folders within your workspace's file storage After uploading your data, you can reorganize files and folders by moving them between directories. There are two ways to move items in the File Storage panel. ## Method 1: Move via Right-Click Menu 1. **Select Items**: Hold **Cmd** (Mac) or **Ctrl** (Windows) and click each file or folder you want to move 2. **Right-Click**: Right-click on any of the selected items 3. **Choose "Move"**: Select "Move" from the context menu 4. **Pick Destination**: Choose which subfolder or the root `/data/` folder to move them into Move via Right-Click Menu ## Method 2: Drag and Drop 1. **Select Items**: Hold **Cmd** (Mac) or **Ctrl** (Windows) and click to select one or more files or folders 2. **Drag**: Click and drag the selected items 3. **Drop onto Folder**: Drop them onto any existing folder at the same level in the file list Drag and Drop to Move A progress status bar will appear to track the move operation. # Upload Files and Folders Source: https://docs.nikaplanet.com/guides/manage-file-lake-per-workspace/upload-files-and-folders Learn how to upload files and folders to your workspace's file storage for data migration Every workspace in NikaPlanet has a built-in File Storage panel on the left sidebar. You can use it to upload, organize, and manage files and folders for your geospatial data workflows. There is no limit to how much data you can store in a single workspace. Users have stored over 100 TB of data in a single workspace for complex projects — the architecture is well tested and proven at scale. For projects of that size, we also provide a dedicated data migration service to ensure timely delivery. [Book a call](https://cal.com/lawrence-nika/nika-expert) or email [support@nikaplanet.com](mailto:support@nikaplanet.com) to learn more. File Storage is the foundation that all other NikaPlanet services build on. Notebooks can access all files here directly in the attached VM, maps can load spatial files from this storage, and pipelines can read and write data here — making it the central hub for your geospatial workflows. ## Step 1: Create Folders Before uploading, you may want to set up a folder structure to keep your data organized. 1. **Open File Storage**: Click the Files icon in the left sidebar of your workspace 2. **Click "+" Button**: Click the "+" button at the top right of the file list 3. **Select "Create Folder"**: Choose "Create Folder" from the dropdown menu 4. **Name Your Folder**: Enter a name for your new folder Create Folder You can repeat this process to create subfolders and build out your desired folder hierarchy. ## Step 2: Navigate Folders To navigate into a folder, **double-click** it. The breadcrumb at the top of the panel shows your current location. `/data/` is the root folder of every workspace. Navigate into Subfolder To go back: * **Click the back arrow** to move up one level * **Click any parent folder** in the breadcrumb to jump directly to it ## Step 3: Upload Files or Folders Once you have navigated to the target folder, there are two ways to upload. ### Method 1: Drag and Drop Simply drag one or more files or folders from your desktop and drop them onto the File Storage panel. Drag and Drop Upload ### Method 2: Upload via Menu 1. **Click "+" Button**: Click the "+" button at the top right 2. **Select "Upload File" or "Upload Folder"**: Choose the appropriate option from the dropdown Upload via Menu ## Step 4: Track Upload Progress Once the upload starts, an **Active Operations** dialog appears showing the progress of each file with percentage bars. Upload Progress ## Step 5: Verify Uploaded Files As files finish uploading batch by batch, they automatically appear in the File Storage panel if you are still viewing the folder they were uploaded to. No manual refresh is needed. Uploaded Files Auto-Refresh # Building Your First App Source: https://docs.nikaplanet.com/guides/tutorials/building-first-app Learn how to build your first application with NikaStudio ## Building Your First App This guide will help you build your first application using NikaStudio. *Content coming soon...* # Geospatial Analysis Source: https://docs.nikaplanet.com/guides/tutorials/geospatial-analysis Learn how to perform geospatial analysis with NikaWorkspace in 7 easy steps ## Geospatial Analysis Learn how to perform geospatial analysis with NikaWorkspace in 7 easy steps. This tutorial will guide you from creating your first notebook to publishing your analysis results. ## Step 1: Create Your First Notebook ### Quick Start 1. **Navigate to Notebooks**: Click on "Notebooks" in the left sidebar 2. **Click "+" Button**: Click the "+" button in the notebook list 3. **Select "Blank Notebook"**: Choose "Blank Notebook" from the dropdown menu 4. **Auto-Save Enabled**: Your notebook is automatically saved ### Rename Your Notebook * **Click Title Area**: Click on the notebook title at the top left * **Type New Name**: Enter a descriptive name like "Geospatial Analysis Project" * **Professional Naming**: Use clear, descriptive names for your projects Create Blank Notebook ## Step 2: Start Your Machine ### Select Machine Configuration Choose from available configurations: * **CPUx3**: 3 CPU cores, 24GB RAM, ready in under 30 seconds (recommended for beginners) * **CPUx7**: 7 CPU cores, 53GB RAM, ready in over 2 minutes * **GPU Machines**: For machine learning and complex processing ### Start Machine 1. **Click "Start Machine"**: Click the prominent white button 2. **Wait for Ready**: Machine will be ready in 15-40 seconds 3. **Monitor Status**: Hover over the green dot to check machine status Start Machine ## Step 3: Add Content Blocks ### Using the "+" Icon 1. **Find "+" Button**: Look for the "+" icon on the left of any row 2. **Click "+"**: Click to add a new block 3. **Select Block Type**: Choose from code, markdown, alerts, or media blocks ### Using Keyboard Shortcut * **Press "/"**: Type "/" in any empty row to trigger block selection * **Choose Block**: Select the desired block type from the menu ### Available Block Types * **Code Block**: For Python code execution * **Alert Block**: Highlight important information * **Headings**: Create section headers * **Media**: Insert images, videos, or file attachments Cool Blocks Available ## Step 4: Run Your Code ### Multiple Execution Methods 1. **Hover Menu**: Hover over code block and click the play button (▶️) 2. **Keyboard Shortcut**: Select block and press `Shift+Enter` 3. **Run All**: Use "Run All" button in top-right toolbar for sequential execution ### Streaming Execution * **Real-time Output**: Results stream in from the kernel * **Background Processing**: Long-running code continues even if you close the workspace * **Return Later**: Come back hours later to see completed results Run Button in Hover Menu ## Step 5: Use Pre-installed Geospatial Libraries ### GDAL and CUDA Ready All VM kernels come with: * **GDAL 3.9.1**: Geospatial Data Abstraction Library * **CUDA 12.2**: NVIDIA CUDA for GPU acceleration * **Python 3.10/3.11**: Multiple Python versions available ### Example Geospatial Code ```python theme={null} # Import geospatial libraries import rasterio import geopandas as gpd import numpy as np # Load raster data with rasterio.open('/workspace/data/satellite.tif') as src: data = src.read() print(f"Raster size: {src.width} x {src.height}") # Load vector data gdf = gpd.read_file('/workspace/data/shapefile.shp') print(f"Number of features: {len(gdf)}") # Perform analysis ndvi = (data[3] - data[2]) / (data[3] + data[2]) print(f"NDVI calculated successfully") ``` GDAL CUDA Pre-installed ## Step 6: Use AI-Powered Features ### Quick AI Edit * **Press `Cmd/Ctrl + K`**: Get AI suggestions for code improvements * **Green Suggestions**: AI suggestions appear in green text * **Preview Execution**: Test suggested changes before accepting * **Accept/Reject**: Choose which suggestions to keep ### Error Resolution with GAIA * **"Resolve in GAIA" Button**: Click when you encounter errors * **AI Analysis**: GAIA analyzes your entire notebook context * **Chat Interface**: Ask questions and get AI assistance * **Direct Modifications**: AI can modify your notebook directly Resolve in GAIA Button ## Step 7: Publish Your Analysis ### Prepare for Publishing 1. **Finalize Your Analysis**: Ensure all code blocks are executed 2. **Add Documentation**: Include markdown blocks explaining your work 3. **Test Functionality**: Verify all interactive features work ### Publish Your Notebook 1. **Right-click Notebook**: Right-click on your notebook in the list 2. **Select "Publish"**: Choose the publish option from the context menu 3. **Fill Required Fields**: Enter title\*, version\*, and category\* 4. **Generate Thumbnail**: Use AI generation if you don't have a thumbnail 5. **Set Visibility**: Choose Team Only or Public access 6. **Click Publish**: Finalize your publication ### View Published Notebook * **Click Arrow Icon**: Click the arrow icon in the publish dialog * **New Tab Opens**: Your published notebook opens in a new tab * **Static View**: Notebook is view-only for others * **Public Hub**: If public, appears in the NikaHub Publish Dialog with Required Fields ## Key Features Summary ### Easy to Use * **Auto-save**: Everything is automatically saved * **Streaming Execution**: Long-running tasks continue in background * **Multiple Execution Methods**: Hover, keyboard shortcuts, or run all * **Block Reordering**: Easy reordering with arrow buttons ### Powerful Analysis * **Pre-installed Libraries**: GDAL, CUDA, and Python ready to use * **Large Dataset Support**: Work with TB-PB sized geospatial data * **GPU Acceleration**: Use CUDA for faster processing * **Real-time Linting**: Code quality feedback as you type ### AI-Powered * **Quick AI Edit**: Get code suggestions with `Cmd/Ctrl + K` * **Error Resolution**: Use GAIA for intelligent error fixing * **Context-Aware**: AI understands your entire notebook * **Chat Interface**: Natural language interaction with AI ### Collaboration Ready * **Team Publishing**: Share with team members * **Public Hub**: Share with the broader community * **Version Control**: Maintain different versions of your work * **Easy Updates**: Modify and republish as needed ## Next Steps Now that you've completed the tutorial: 1. **Explore Libraries**: Check [Supported Python Libraries](/guides/data-analysis/supported-python-libraries) 2. **Advanced Features**: Learn about [AI Coding in Notebook](/guides/data-analysis/ai-coding-in-notebook) 3. **Machine Management**: Understand [Starting Your Machine](/guides/data-analysis/start-machine) 4. **Publishing**: Master [Publishing Your Notebook](/guides/data-analysis/publish-notebook) Happy geospatial analyzing! # Getting Started With NikaWorkspace Source: https://docs.nikaplanet.com/guides/tutorials/getting-started-with-nikaworkspace Learn the basics of Nika platform and get familiar with the interface ## Getting Started with NikaWorkspace Welcome to Nika! This guide will help you get familiar with the platform and start your first project. ## Prerequisites Before you begin, make sure you have: * **Nika Account**: Sign up at [https://planet.nika.eco](https://planet.nika.eco) * **Onboarding**: Book and complete your [onboarding call](https://cal.com/dianaong/30-minute-consultation) to get trial access ## Step 1: Manage Data Workspaces 1. **Project**: Each of your workspaces is a logical separation for project management, to keep your resources such as file storage, notebooks, maps and databases separate. 2. **Login**: Visit [https://planet.nika.eco](https://planet.nika.eco) and sign in 3. **Dashboard**: You'll see your main dashboard with access to a default workspace if you log in for the first time 4. **Navigation**: Click on the default workspace to open, use the left sidebar to navigate between different tools List of Workspaces ## Step 2: Explore the Interface ### Main Components * **Left Sidebar**: Navigation between Nika products * **Top Bar**: User settings, notifications, and help * **Main Area**: Content area that changes based on selected tool * **Right Panel**: Context-sensitive tools and options Nika UI Overview ### Available Tools in Nika * **Nika Notebooks**: Data analysis, notebooks and VM * **Nika Map**: Interactive map visualization * **Nika Studio**: Application development * **Publish to Nika Hub**: Community and team internal sharing * **Nika Labeler**: Image annotation * **Nika ETL**: Data processing pipelines * **Nika Database Engine**: Intergration with your existing databases or one click creation of Nika managed DuckDB instance * **Nika GAIA**: Nika's AI Agent for coding and mapping ### Create a New Map 1. **Click Map** icon in the left sidebar 2. **Click "+"** button to create new map 3. **Drag files** from the files list in left sidebar to add as layer to the open map. Note: drop to the center of the map to trigger `Add to Map` instead of opening file Create New Map ### Create a New Notebook 1. **Click Notebook** icon in the left sidebar 2. **Click "+"** button to create new notebook 3. **Click Machine** icon at bottom left to then start the machine 4. **Run code in your notebook** by following this [guide](/guides/data-analysis/run-code-in-notebook) Create New Notebook ## Step 3: Upload Your First Data ### Upload Files 1. **Click "Files"** in the left sidebar 2. **Click "Upload"** button and select your files from desktop 3. **Drag and Drop** alternaitvely, drag multiple files and drop them on the file list when left sidebar is open 4. **Wait for processing** to complete Upload Files ### Design of Nika File Storage * **Size Limit**: Theoretically Nika Cloud FS can host up to 100s of TB size per workspace * **Integration**: These files are natively accessible in your notebook code through secure connection, and adding them as layer to map is as easy as drag and drop on map * **Editor**: For certain formats like .py, .json, .js, you can double click to open the file in Nika web UI and edit them directly * **Machine Learning**: If you are try to train machine learning models over a large groups of test/train/eval split datasets, Nika FS is the best option as your machine learning code in notebook work immediately on files Upload Files ## Next Steps Now that you're familiar with the basics: 1. **Try Making a Map**: Follow the [Create NikaMap Tutorial](/guides/tutorials/map-visualization) guide 2. **Start Data Analysis**: Follow the [Create Notebook Tutorial](/guides/tutorials/geospatial-analysis) guide 3. **Explore Features**: Check out the other guides in this section 4. **Join Community**: Visit [NikaHub](https://planet.nika.eco/en/hub) to see examples Happy mapping and analyzing! # Map Visualization Tutorial Source: https://docs.nikaplanet.com/guides/tutorials/map-visualization Learn how to create effective map visualizations with Nika in 7 simple steps ## Map Visualization Tutorial This tutorial will guide you through creating a complete map visualization using Nika's powerful mapping tools. You'll learn how to create maps, add different types of data layers, and style them effectively to create compelling visualizations. ## What You'll Learn By the end of this tutorial, you'll be able to: * Create a new map from scratch * Add vector, raster, and image data layers * Style different layer types for optimal visualization * Organize and manage your map layers * Export your final visualization ## Prerequisites Before starting, make sure you have: * Access to NikaWorkspace * Sample data files ready (we'll provide examples) * A modern web browser ## Step 1: Create Your First Map ### Access NikaMap 1. **Navigate to NikaMap**: In NikaWorkspace, click on the Globe icon in the left sidebar 2. **View Map List**: You'll see a list of your existing maps on the left panel 3. **Create New**: Click the "+" button and then the "New Map" button to create a new one NikaMap Create ### Name Your Map 1. **Right-click** on your new map to open the rename dialog 2. **Enter a descriptive name** like "My Visualization Project" 3. **Click "Save"** to finalize Map Naming **Pro Tip**: Use clear, descriptive names that will help you identify your map later. ## Step 2: Prepare Your Sample Data For this tutorial, you'll need three types of sample data: ### Vector Data ([Download Sample File](https://drive.google.com/file/d/1vzdqgcTXbEGNS_Q_uuwQq00D3jLeD75c/view?usp=sharing)) * **GeoJSON file**: Contains point, line, or polygon features * **Shapefile**: Traditional GIS vector format * **CSV with coordinates**: Tabular data with latitude/longitude columns ### Raster Data ([Download Sample File](https://storage.cloud.google.com/raster-datasources/Hansen%20GFC%202023%20v1.11%2000N%20050W.tif?authuser=0)) * **GeoTIFF**: High-quality raster imagery or elevation data * **COG**: Cloud optimized geotiff raster images with the same file extension as .tiff or .tif ### Image Data ([Download Sample File](https://www.globhe.com/sample-drone-data)) * **JPEG**: High-resolution images for overlay **Download Sample Data**: Click links above to download if you do not have some of these formats to try in NikaMap ## Step 3: Add Vector Layers ### Upload Vector Data 1. **Open Files Panel**: Click "Files" in the left sidebar 2. **Select your vector file** (GeoJSON, Shapefile, or CSV) 3. **Right-click** and select "Add to Map" with your map selected 4. **Wait for processing** - larger files may take a moment Upload Files ### Verify Layer Addition * **Check the layers panel** on the left side * **Your vector layer** should appear in the list * **Layer will be visible** on the map automatically ## Step 4: Style Your Vector Layers ### Access Vector Styling 1. **Right-click** on your vector layer in the layers panel 2. **Select "Layer Styles"** from the context menu 3. **Styling panel opens** with customization options Vector Layer Styling ### Customize Vector Appearance #### For Point Layers: * **Icon Color**: Set point symbol color using the color picker * **Opacity**: Adjust transparency (0-100%) #### For Line Layers: * **Line Color**: Choose line color from the color picker * **Line Width**: Set thickness using the slider (in pixels) * **Opacity**: Control transparency #### For Polygon Layers: * **Fill Color**: Set interior color of polygons * **Opacity**: Adjust fill transparency * **Line Color/Width**: Customize polygon borders ### Layer Organization * **Reorder layers** by dragging them in the layers panel * **Bottom layers** appear on top of the map * **Toggle visibility** using the eye icon Layers Panel ## Step 5: Add and Style Raster Layers ### Upload Raster Data 1. **Select your raster file** (GeoTIFF, JPEG with georeference) 2. **Add to map** drag the .tiff file from your desktop into middle section of the opened NikaMap to upload it directly 3. **Wait for processing** - raster files may take longer Drag from Desktop ### Access Raster Styling 1. **Right-click** on your raster layer 2. **Select "Layer Styles"** to open the styling panel Raster Layer Styling Overview ### Choose Visualization Type #### Single Channel Mode: * **Select one band** (b1, b2, b3, etc.) * **Set data range** using min/max sliders * **Apply color map** (grayscale, blues, greens, etc.) #### RGB Channels Mode: * **Assign bands** to Red, Green, and Blue channels * **Set individual ranges** for each color channel * **Create natural or false color** composites Visualization Types ### Adjust Data Range 1. **View histogram** showing data distribution 2. **Drag sliders** to set optimal min/max values 3. **See real-time updates** on the map Band Range Control ### Select Color Maps Choose from various color schemes: * **Grayscale**: For general data visualization * **Sequential colors**: For continuous data (elevation, temperature) * **Specialized**: Rainbow, Viridis, Plasma for complex data Color Map Options ## Step 6: Add Image Overlays ### Upload Image Data 1. **Select your image file** (JPEG, PNG) 2. **Add to map** using drag-and-drop or right-click 3. **Position appropriately** in the layer stack ### Image Layer Management * **Adjust opacity** to blend with underlying layers * **Reorder layers** to control stacking * **Toggle visibility** as needed ## Step 7: Finalize Your Visualization ### Layer Organization 1. **Arrange layers logically**: Background to foreground 2. **Set appropriate opacity** for each layer 3. **Ensure proper stacking order** ### Export Your Map 1. **Right-click** on individual vector layers to export as GeoJSON 2. **Right-click** on layer groups to export as GeoPackage 3. **Choose destination**: Desktop or NikaWorkspace storage Layer Export ### Share Your Visualization * **Publish your map** for public sharing * **Collaborate** with team members * **Export high-resolution** images for presentations ## Best Practices for Map Visualization ### Data Preparation * **Use appropriate file formats** for your data type * **Ensure proper coordinate systems** (will auto-convert to EPSG:3857) * **Keep file sizes reasonable** for optimal performance ### Visual Design * **Choose complementary colors** for different layer types * **Use opacity effectively** to show multiple layers * **Consider colorblind-friendly** color schemes when possible ### Performance Optimization * **Limit the number** of simultaneous layers * **Simplify complex geometries** when possible * **Use appropriate zoom levels** for detailed data ### Layer Management * **Use descriptive names** for all layers * **Group related layers** together * **Remove unused layers** to keep maps clean ## Troubleshooting Common Issues ### Layer Not Appearing * **Check visibility**: Ensure the eye icon is enabled * **Zoom to layer**: Double-click layer name to zoom to extent * **Verify coordinate system**: Data should have proper spatial reference ### Performance Issues * **Reduce file sizes**: Simplify large datasets * **Limit active layers**: Hide unnecessary layers * **Refresh browser**: Clear cache if needed ### Styling Problems * **Reset styling**: Use reset button in styling panel * **Check data ranges**: Ensure min/max values are appropriate * **Verify layer order**: Ensure proper stacking ## Next Steps Now that you've mastered basic map visualization: 1. **Explore Advanced Styling**: Learn about attribute-based styling and custom color schemes 2. **Create Interactive Maps**: Add popups and interactive features 3. **Collaborative Mapping**: Work with team members on shared projects 4. **Publish and Share**: Make your visualizations public Happy visualizing! # ADSB Flight Data Source: https://docs.nikaplanet.com/industrial-solutions/adsb-flight-data Comprehensive data pipeline for downloading, processing, and visualizing ADS-B flight tracking data with regional GeoJSON generation # ADSB Flight Data ADSB Flight Data ## ADSB Flight Data Processing and GeoJSON Visualisation Pipeline A comprehensive data pipeline that downloads, processes, and visualizes ADS-B (Automatic Dependent Surveillance-Broadcast) flight tracking data from June 2024. The system extracts flight traces from GitHub releases, processes them into a DuckDB database, and generates regional GeoJSON files for flight path visualisation. ## Libraries Needed ### Core Libraries * **os** - File system operations * **requests** - HTTP requests for downloading data * **tarfile** - Archive extraction * **gzip** - Compressed file handling * **json** - JSON data parsing ### Database & Data Processing * **duckdb** - High-performance analytical database * **pandas** - Data manipulation and analysis * **numpy** - Numerical computing ### Utilities * **datetime / time** - Date/time operations * **pathlib.Path** - Modern path handling * **collections.defaultdict** - Data structures * **multiprocessing.Pool** - Parallel processing * **concurrent.futures** - Asynchronous execution * **tempfile** - Temporary file management * **shutil** - High-level file operations * **urllib3.util.retry** - HTTP retry strategies * **requests.adapters.HTTPAdapter** - HTTP session configuration ## Input Files ### GitHub Release Archives * v2024.06.01-planes-readsb-staging-0 through v2024.06.30-planes-readsb-staging-0 ### Compressed JSON Files * .json.gz, .json files containing flight trace data ### Split TAR Archives * .tar.aa, .tar.ab, .tar.gz files ### Flight Trace JSON Structure * **icao** - Aircraft identifier * **registration** - Aircraft registration * **trace** - Array of \[timestamp, latitude, longitude, altitude, heading, speed, vertical\_rate] * **aircraft\_type** - Aircraft model * **description** - Aircraft description ## Output Files ### DuckDB Database * **adsb\_june.duckdb, adsb\_dat\_main.duckdb** - Structured flight data storage ### Temporary Parquet Files Intermediate data storage for parallel processing ### Regional GeoJSON Files * **north\_america\_flights.geojson** * **europe\_flights.geojson** * **asia\_flights.geojson** * **africa\_flights.geojson** * **australia\_flights.geojson** * **oceania\_flights.geojson** * And other regional flight path visualizations ### Flight Traces Table Schema * Aircraft metadata (ICAO, registration, type) * Positional data (latitude, longitude, altitude) * Movement data (speed, heading, vertical rate) * Temporal data (timestamps, sequences) ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Flood Risk Data LULC In Urban Areas Source: https://docs.nikaplanet.com/industrial-solutions/flood-risk-data-lulc-urban-areas Prepare core geospatial layers for analyzing flood-prone areas in Bangkok using elevation, land cover, and rainfall data # Flood Risk Data LULC In Urban Areas Flood Risk Data LULC In Urban Areas This script prepares core geospatial layers for analyzing flood-prone areas in Bangkok. It exports elevation, land cover (water and built-up areas), and October 2023 rainfall data to local GeoTIFF files using Google Earth Engine and geemap. The outputs are used for flood vulnerability analysis, especially in low-lying, urbanized zones. ## Output File `/data/bangkok_flood_native` ## Requirements | Requirement | Details | | - | - | | **Software** | Python 3.x, Earth Engine Python API, geemap | | **Earth Engine** | Enabled Google Earth Engine account ([https://signup.earthengine.google.com](https://signup.earthengine.google.com)) | | **Python Packages** | geemap, earthengine-api, os, ee | | **Internet** | Required for Earth Engine data download | ## Files Created | Filename | Description | Resolution | | - | - | - | | **dem\_srtm.tif** | Elevation data from SRTM (clipped to AOI) | 30 m | | **dw\_water\_built\_mask.tif** | Masked Dynamic World image (1=Water, 2=Built) | 10 m | | **rainfall\_oct2023\_chirps.tif** | CHIRPS total rainfall for Oct 2023 | \~5.5 km | ## High-Level Workflow Steps ### 1. Setup and Define AOI Define Bangkok's location and buffer by 10 km to create an Area of Interest (AOI). ### 2. Export SRTM Elevation * Use the **USGS/SRTMGL1\_003** dataset * Export as `dem_srtm.tif` at 30 m resolution ### 3. Export Landcover (Water & Built) * Use the **Google Dynamic World** dataset for 2023 * Use `.mode()` to get the most frequent class * Remap values: 0 → Water (1), 6 → Built (2), others → 0 * Export as `dw_water_built_mask.tif` at 10 m resolution ### 4. Export Rainfall * Use **CHIRPS Daily** rainfall dataset * Sum rainfall for October 2023 * Export as `rainfall_oct2023_chirps.tif` at \~5.5 km resolution ## Flood Risk Classification This script generates a flood risk classification map of Bangkok using: * **SRTM DEM (Elevation at 30m)** to identify low-lying areas (\< 5 meters elevation) * **Dynamic World Landcover (10m)** to locate built-up and water regions ### Output: Flood-Prone Map You get a matplotlib map showing flood-prone areas based on both elevation and landcover: #### Legend Explained | Color | Label | Meaning | | - | - | - | | 🔵 **Blue** | Low-lying Water | Areas classified as water in DW and below 5 meters elevation | | 🔴 **Red** | Low-lying Built-up | Areas classified as built-up and below 5 meters elevation | ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Mean Sea Level Effect On Coastal Regions Source: https://docs.nikaplanet.com/industrial-solutions/mean-sea-level-coastal-regions Sea level rise impact analysis for Manila, Philippines using DEM-based scenarios and IPCC AR6 projections # Mean Sea Level Effect On Coastal Regions Mean Sea Level Effect On Coastal Regions ## Sea Level Rise Impact Analysis for Manila, Philippines ### Purpose This notebook provides two approaches to analyze the impact of sea level rise on Manila's coastal areas: 1. **DEM-based fixed sea level rise scenarios** (0.5m, 1m, 2.5m) using Copernicus DEM and population density 2. **IPCC AR6 regional sea level projections** for selected SSP scenarios and years, combined with DEM and population density ### Date Thursday, July 3, 2025 ## Required Libraries * **earthengine-api** * **geemap** * **numpy** * **matplotlib** ## Data Sources ### DEM **Copernicus DEM GLO-30** (30m resolution) from Google Earth Engine ### Population Density **GPWv411** from Google Earth Engine ### Sea Level Projections **IPCC AR6 Sea Level Projections Regional (Medium Confidence)** from Google Earth Engine ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Mineral and Vegetation Index Calculation from Sentinel-2 Imagery Source: https://docs.nikaplanet.com/industrial-solutions/mineral-vegetation-index-sentinel2 Calculate remote sensing indices for geological and environmental applications using different band combinations of satellite imagery # Mineral and Vegetation Index Calculation from Sentinel-2 Imagery Mineral and Vegetation Index Calculation from Sentinel-2 Imagery ## Mineral and Vegetation Index Calculation from Satellite Imagery This Python script is designed to process GeoTIFF files, which are a common format for satellite and aerial imagery. The script calculates a series of remote sensing indices—specifically, mineral and vegetation indices—using different band combinations of the input imagery. It performs calculations like those for Ferrous Iron, Iron Oxide, Clay Minerals, Hematite, Gossan Minerals, Ferric Iron, NDVI (Normalized Difference Vegetation Index), Iron Oxide NIR, and Mineral Alteration NIR. The script then saves the calculated index values as new GeoTIFF files and generates two types of visualizations for each index: one showing the full range of values and another highlighting areas with high concentrations (above the 95th percentile). This process is useful for geological and environmental remote sensing applications, such as identifying potential mineral deposits or assessing vegetation health. ## Libraries Used * **numpy**: Used for efficient numerical operations and array manipulation, which is essential for performing calculations on the image data * **rasterio**: A key library for reading and writing geospatial raster data. It handles the I/O of GeoTIFF files, including their crucial metadata like coordinate reference systems and transformations * **matplotlib.pyplot**: Used for creating static, interactive, and animated visualizations of the index results * **os**: Provides a way to interact with the operating system, allowing the script to manage file paths and create directories * **pathlib**: An object-oriented filesystem path library used for handling file paths more cleanly and cross-platform ## Input and Output Datasets ### Input Dataset * One or more GeoTIFF (.tif or .tiff) files containing multi-band satellite imagery * The script is designed to read these files from the specified input\_dir (/data/COPERNICUS/) * The band numbers b1, b2, b3, etc., in the expressions correspond to the bands in the input TIFF file ### Output Datasets For each input TIFF file, the script creates a new directory within the output\_dir (/data/Australia\_rare\_earth\_mine\_output/). **Two GeoTIFF files are generated for each calculated index:** * **.tif**: A GeoTIFF file containing the calculated index values for the full range of data * **\_HighConcentration.tif**: A GeoTIFF file containing only the top 5% of index values, with the rest of the data set to a "no data" value (NaN). This highlights high-concentration areas **One PNG visualization file is generated for each index:** * **\_visualization.png**: A single image file with two subplots: one showing the full-range index and another showing the high-concentration areas on a transparent background for easy identification ## Step-by-Step Implementation ### STEP-1: Sample Area Selection The mine near Lenister area in Australia is taken as a sample using the geojson provided. **Upload or create a new vector BBOX using DRAW function tab in Nika Map** **Use data catalog to download the AOI as shown below** The output is saved in `data/COPERNICUS` ### STEP-2: Code Execution Run the code below: Output saved in `/data/Australia_rare_earth_mine_output/S2_SR_HARMONIZED_composite_2025-08-20T04-01-49-420Z/` **For each mineral profile:** * The corresponding single channel TIF image is formed * A second TIF image highlighting the highest concentration more than 95% percentile is saved separately (example: `ClayMineral_High_concentration.tif`) **To make it more appealing:** * Change the raster color to red using raster settings color * A PNG image showing the scale of intensity is saved for each mineral component ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# River Corridor Urbanisation Source: https://docs.nikaplanet.com/industrial-solutions/river-corridor-urbanisation Multi-temporal geospatial analysis with buffer-based proximity assessment to quantify urban encroachment patterns within river corridors # River Corridor Urbanisation River Corridor Urbanisation ## Methodology The analysis employs multi-temporal geospatial analysis with buffer-based proximity assessment to quantify urban encroachment patterns within river corridors through statistical comparison of built-up surface densities across defined temporal intervals. ## Software & Libraries ### Google Earth Engine API Cloud-based geospatial processing platform ### Python Environment with Essential Packages * **earthengine-api** - Earth Engine Python client * **geopandas** - Vector data processing and analysis * **rasterio** - Raster data I/O and manipulation * **numpy** - Numerical computing and array operations * **matplotlib** - Visualization and plotting * **seaborn** - Statistical data visualization * **scipy** - Statistical analysis and KDE calculations ## Data Sources * **WWF HydroSHEDS Free Flowing Rivers Dataset** - Global river network vector data * **JRC/GHSL/P2023A/GHS\_BUILT\_S** - Built-up surface density raster collection (1990-2020) * **Service Account Credentials** - JSON authentication file for Earth Engine API access ## Computational Requirements ### Google Earth Engine Quota Processing credits for cloud computation ### Local Storage Minimum 2-5 GB for exported datasets and outputs ### Memory 8+ GB RAM recommended for raster processing ### Processing Power Multi-core CPU for local statistical computations ## Output Files ### Geospatial Data Exports * **river\_buffer\_corridor.geojson** - 500m buffered river zones vector file * **built\_up\_1990.tif** - Baseline built-up density raster (1990) * **built\_up\_2020.tif** - Current built-up density raster (2020) * **change\_raw\.tif** - Raw change in built-up density (2020-1990) * **change\_percentage.tif** - Percentage change in built-up density * **major\_development\_zones.tif** - High-impact development areas ### Analytical Outputs * **encroachment\_statistics.csv** - Comprehensive statistical summary table * **environmental\_impact\_categories.csv** - Pixel classification by impact levels * **temporal\_analysis\_results.json** - Calculated metrics and trend indicators ### Visualization Products * **comprehensive\_analysis\_dashboard.png** - Multi-panel analytical figure * **spatial\_distribution\_maps.png** - Built-up density spatial comparisons * **statistical\_distributions.png** - Histograms and KDE plots * **trend\_projections.png** - Future urbanization scenario plots * **environmental\_risk\_assessment.png** - Risk gauge and impact visualizations ## High-Level Steps ### 1. Geospatial Data Preparation Initialize Earth Engine API, define AOI boundaries, configure output directories for data export ### 2. River Corridor Delineation Extract river networks from HydroSHEDS dataset, apply 500m buffer zones, export corridor geometries as vector data ### 3. Built-up Surface Extraction Acquire JRC/GHSL built-up datasets for target years (1990, 2020), clip to river corridors, normalize density values to percentages ### 4. Temporal Change Computation Calculate raw change metrics (2020-1990), derive percentage change rates, identify major development zones through threshold analysis ### 5. Statistical Aggregation Compute descriptive statistics (mean, median, standard deviation) for each temporal layer, mask NoData values, categorize environmental impact levels ### 6. Multi-dimensional Visualization Generate comprehensive analytical dashboard with spatial maps, temporal comparisons, statistical distributions, trend projections, and risk assessment gauges ### 7. Environmental Impact Assessment Synthesize quantitative metrics into urbanization rates, encroachment patterns, and future risk projections with detailed interpretative reporting ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# River Ecology Stress Hotspot Source: https://docs.nikaplanet.com/industrial-solutions/river-ecology-stress-hotspot Identify river segments with highest urban development pressure and measure rapid urbanization areas along river corridors # River Ecology Stress Hotspot River Ecology Stress Hotspot Analysis ## Hotspot Detection Identify river segments with highest urban development pressure. Measure the rapid urbanization areas along the river corridor and highlight the region where the most massive urbanization has happened. ## Description This project analyzes urbanization hotspot trends within river corridors of the Chennai Metropolitan Area between 1990 and 2020 using Google Earth Engine and the Global Human Settlement Layer (GHSL) data. It provides comprehensive spatial and statistical insights into built-up area changes, assessing environmental risks and projecting future trends. ## Resources Needed ### Google Earth Engine (GEE) Account Access to the GEE platform is essential for data processing and analysis. ### GEE Service Account Credentials A service account email and a corresponding JSON key file are required for programmatic authentication to GEE. ### Python Environment A Python installation (3.8 or higher recommended) with the following libraries: * **ee** - Google Earth Engine Python API * **geemap** - Interactive mapping with Google Earth Engine * **rasterio** - Geospatial raster data I/O * **geopandas** - Geospatial data manipulation and analysis * **numpy** - Numerical computing * **pandas** - Data manipulation and analysis * **matplotlib** - Plotting and visualization * **seaborn** - Statistical data visualization * **scipy** - Scientific computing * **scikit-learn** - Machine learning algorithms * **shapely** - Geometric operations ## Output The script will produce the following outputs in a newly created directory named `[analysis_output_directory]`: ### GeoJSON Files * **\[primary\_features].geojson**: Vector file representing the main geographic features or analysis zones * **\[analysis\_regions].geojson**: Vector file containing processed spatial analysis regions ### GeoTIFF Files * **\[baseline\_data].tif**: Raster image of baseline conditions for the specified time period * **\[current\_data].tif**: Raster image of current conditions for comparison analysis * **\[change\_analysis].tif**: Raster image showing change patterns between time periods * **\[derived\_metrics].tif**: Raster image of calculated indices or composite metrics * **\[classification\_results].tif**: Raster image showing classified categories or zones ### PNG Image Files * **\[comprehensive\_analysis].png**: Multi-panel figure summarizing the analysis with spatial maps, statistical plots, and key findings * **\[detailed\_analysis].png**: In-depth visualization showing specific patterns, trends, and additional statistical breakdowns ### CSV Files * **\[analysis\_summary].csv**: Tabular summary of key statistical metrics and results * **\[detailed\_statistics].csv**: Comprehensive statistical output with segment-wise or zone-wise metrics ### Console Output Detailed progress messages, processing status, statistical summaries, and final analysis results. ## Methodology and High-Level Steps ### 1. Earth Engine Initialization Authenticate Google Earth Engine API using service account credentials and configure cloud computing environment. ### 2. Configuration Setup Define Area of Interest (AOI), establish output directory structure, and set analysis parameters including thresholds and buffer distances. ### 3. Data Processing (Google Earth Engine) Load datasets from Earth Engine catalog, apply spatial/temporal filters, perform geometric operations, process raster imagery, calculate change metrics, and export GeoJSON/GeoTIFF files. ### 4. Local Data Integration Load exported GeoJSON files into GeoPandas and GeoTIFF files using rasterio, then validate data integrity. ### 5. Statistical Analysis Mask NoData values, calculate comprehensive statistics, perform zone-wise analysis, compute derived metrics, and apply statistical validation procedures. ### 6. Classification and Ranking Develop scoring algorithms, apply threshold-based classification, rank features by calculated metrics, and perform spatial clustering analysis. ### 7. Comprehensive Visualization Generate multi-panel matplotlib figures with spatial maps, statistical plots, comparative visualizations, and apply appropriate styling for clarity. ### 8. Results Compilation and Export Compile analytical results into structured formats, generate CSV files and comprehensive reports, and organize outputs with clear naming conventions. ### 9. Quality Assurance and Validation Implement error handling, perform validation checks, document processing steps, and generate processing logs for reproducibility. ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# River Urbanisation With Major Cities Comparisons Source: https://docs.nikaplanet.com/industrial-solutions/river-urbanisation-major-cities-comparisons Process satellite imagery to analyze urban development patterns across multiple regions with statistical summaries and comparison plots # River Urbanisation With Major Cities Comparisons River Urbanisation With Major Cities Comparisons ## River Basin Urban Development Analyzer Processes satellite imagery (built-up, water, NDVI) to analyze urban development patterns across multiple regions, generating statistical summaries, comparison plots, and detailed land use classifications. ## Requirements | Requirement | Details | | - | - | | **Software** | Python 3.x, rasterio, matplotlib, pandas, numpy | | **Data Sources** | Pre-downloaded satellite imagery (Built-up, Water, NDVI, Satellite) | | **Python Packages** | rasterio, numpy, pandas, matplotlib, seaborn, geopandas, shapely, pathlib | ## Input Data TIF files for each region: `*_buildup.tif`, `*_water.tif`, `*_ndvi.tif`, `*_satellite.tif` ## Files Created | Filename | Description | Format | | - | - | - | | **region\_summary.csv** | Statistical summary for all analyzed regions | CSV | | **comparison\_analysis.png** | 4-panel comparison plots across all regions | PNG (300 DPI) | | **\_detailed\_analysis.png** | Detailed 4-panel analysis for each region | PNG (300 DPI) | | **analysis\_report.md** | Comprehensive markdown report with insights | Markdown | ## High-Level Workflow Steps ### 1. Region Discovery & Data Loading Auto-discover regions from `*_buildup.tif` files in data directory Load corresponding water, NDVI, and satellite imagery for each region Handle nodata values and coordinate transformations ### 2. Statistical Analysis Calculate built-up area coverage and intensity (hectares & percentages) Analyze water occurrence (permanent vs seasonal water bodies) Compute vegetation indices (NDVI-based green cover analysis) Generate composite land use statistics ### 3. Urban Classification * **Dense Urban**: >50% built-up coverage * **Moderate Urban**: 25-50% built-up coverage * **Low Urban**: 10-25% built-up coverage * **Rural/Natural**: \<10% built-up coverage ### 4. Visualization Generation **Comparison Plots**: 4-panel matplotlib figure with scatter plots, bar charts, and pie charts **Regional Details**: Individual 4-panel analysis showing built-up, water, NDVI, and land use classification **Static PNG Output**: High-resolution images suitable for reports and publications ### 5. Report Generation Regional rankings (most urbanized, highest water coverage, most vegetated) Key insights and development patterns Comprehensive data tables with all calculated metrics ## Output Analysis Capabilities This script generates comprehensive urban development assessment using: * **Built-up Intensity Maps** - Identifies urban development patterns and density * **Water Occurrence Analysis** - Distinguishes permanent vs seasonal water bodies * **Vegetation Health (NDVI)** - Maps green cover and vegetation density * **Land Use Classification** - Composite analysis of urban, water, vegetation, and other land uses ## Visualization Outputs ### Comparison Analysis (4-Panel Plot) * **Built-up vs Water Coverage Scatter** - Shows relationship between urbanization and water presence (colored by NDVI) * **Vegetation Distribution Bar Chart** - Compares green cover across all regions * **Urban Development Intensity** - Color-coded by urban classification (Dense/Moderate/Low/Rural) * **Average Land Use Pie Chart** - Overall composition of built-up, water, vegetation, and other land uses ### Detailed Regional Analysis (Per Region) * **Built-up Areas Map** - Red intensity showing urban development density * **Water Occurrence Map** - Blue gradient showing water body frequency (0-100%) * **Vegetation Index (NDVI)** - Green-red gradient showing vegetation health (-0.2 to 0.8) * **Land Use Classification** - Categorical map (Urban=Red, Water=Blue, Vegetation=Green, Other=Black) ## Key Metrics Calculated | Category | Metrics | | - | - | | **Built-up** | Mean intensity, max intensity, total area (ha), high-density area (ha), percentage coverage | | **Water** | Mean occurrence, permanent water area (>80%), seasonal water area (20-80%), percentage coverage | | **Vegetation** | Mean NDVI, vegetation area (>0.3), dense vegetation (>0.5), bare soil area, percentage coverage | | **Composite** | Total area, urban classification, development patterns, land use ratios | ## Analysis Insights Generated * **Urban Pressure Assessment** - Identifies regions with high development pressure * **Water Resource Mapping** - Quantifies permanent vs seasonal water availability * **Green Space Evaluation** - Measures vegetation cover and ecological health * **Development Patterns** - Reveals relationships between urbanization and environmental factors ## Result Multi-scale urban development analysis with both regional comparisons and detailed local assessments for sustainable planning and environmental monitoring. ## Output ### Quick Summary | region | buildup\_percentage | water\_percentage | urban\_class | | - | - | - | - | | ahmedabad\_sabarmati | 96.981293 | 5.442177 | Dense Urban | | delhi\_yamuna | 84.551857 | 4.091872 | Dense Urban | | kolkata\_hooghly | 93.197279 | 6.998953 | Dense Urban | | pune\_rivers | 96.072101 | 2.199354 | Dense Urban | ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Singapore MRT Yearly Visualisation Source: https://docs.nikaplanet.com/industrial-solutions/singapore-mrt-yearly-visualisation Process Singapore MRT rail network GeoJSON and split into separate files organized by year and rail line for historical development analysis # Singapore MRT Yearly Visualisation Singapore MRT Yearly Visualisation ## Singapore MRT Rail Network GeoJSON Year-wise Line Splitter ### Description This Python script processes a comprehensive Singapore MRT (Mass Rapid Transit) rail network GeoJSON file and splits it into separate files organized by year and rail line. It normalizes line names, assigns feature numbers, and creates individual GeoJSON files for each line's opening year, making it easier to analyze the historical development of Singapore's rail transit system. ## Data Sources ### Primary Input **sg-rail\_with\_years\_patched.geojson** - A comprehensive GeoJSON file containing Singapore's entire rail network with temporal data ### Input Directory `/data/singapore_mrt/main_source_folder/` ## Input Data Structure ### Geometry Types Processed * **LineString/MultiLineString** (rail lines) * **Point** (stations/stops) * **Polygon/MultiPolygon** (areas/zones) ### Required Properties * **year**: Opening year of the rail segment * **name**: Name/identifier of the rail line ## Rail Lines Covered * **North South Line (NSL)** * **East West Line (EWL)** * **North East Line (NEL)** * **Circle Line (CCL)** * **Downtown Line (DTL)** * **Thomson-East Coast Line (TEL)** * **Bukit Panjang LRT (BPLRT)** * **Sengkang LRT with East/West loops (SKLRT)** * **Punggol LRT with East/West loops (PGLRT)** ## Output ### Generated Files **Year-Line Specific Files**: Numbered GeoJSON files for each line-year combination **Format**: `XX_singapore_[LINE_CODE]_[YEAR].geojson` **Example**: `01_singapore_NSL_1987.geojson` ### Aggregated Files * **singapore\_all\_points.geojson** - All station/point features * **singapore\_all\_polygons.geojson** - All polygon/area features ### Output Directory `/data/singapore_mrt/year_wise_geojsons_new/` ## Output Enhancements ### Feature Numbering Each feature gets a sequential number property ### Normalized Codes Standardized line codes (NSL, EWL, etc.) ### Chronological Organization Files sorted by opening years (1987-2020) ## Libraries Used ### Core Python Libraries * **os**: File system operations and directory management * **json**: JSON file reading, writing, and manipulation * **collections.defaultdict**: Efficient nested dictionary creation for grouping features ### Geospatial Libraries * **shapely.geometry**: * **shape**: Converting GeoJSON geometry to Shapely objects * **mapping**: Converting Shapely objects back to GeoJSON format * Used for potential geometric operations (imported but not actively used in current implementation) ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Urban Construction Near Riparian Areas Source: https://docs.nikaplanet.com/industrial-solutions/urban-construction-riparian-areas Analyze riparian zone urbanization gradients and quantify built-up surface density changes with distance from river systems # Urban Construction Near Riparian Areas Urban Construction Near Riparian Areas ## Riparian Zone Urbanization Gradients This project performs an analysis of riparian zone urbanization gradients near the Amazon River, specifically focusing on a defined area near Manaus. It quantifies how built-up surface density changes with increasing distance from river systems, providing insights into human impact on riparian ecosystems. ## Resources Needed ### Software * Python 3.x ### Libraries * **earthengine-api**: For interacting with Google Earth Engine * **pandas**: For data manipulation and analysis * **matplotlib**: For creating static, interactive, and animated visualizations in Python * **numpy**: For numerical operations * **seaborn**: For statistical data visualization * **Pillow (PIL)**: For image processing * **requests**: For making HTTP requests (e.g., downloading images) ### Google Earth Engine Account An active Google Earth Engine account is required to access the spatial datasets. ### Internet Connection Essential for accessing Earth Engine data and services. ## Input Files This project does not require explicit input files from your local machine. All necessary spatial data is accessed directly from the Google Earth Engine data catalog: * **WWF/HydroSHEDS/v1/FreeFlowingRivers**: Global dataset of free-flowing rivers * **JRC/GHSL/P2023A/GHS\_BUILT\_S**: Global Human Settlement Layer (GHSL) Built-up Surface dataset for 2020 * **FAO/GAUL/2015/level2** (Optional): Administrative boundaries used if the AOI is defined by an administrative name (not used in the provided code's default AOI) ## Output Files The project generates output files within a newly created output folder: * **riparian\_amazon\_analysis\_YYYYMMDD\_HHMMSS.png**: A high-resolution PNG image of the generated plots, visualizing the urbanization gradient and the spatial distribution of buffer zones * **riparian\_amazon\_results\_YYYYMMDD\_HHMMSS.csv**: A CSV file containing the detailed urbanization metrics for each riparian buffer zone, including area, mean built-up percentage, and standard deviation * **riparian\_amazon\_summary\_YYYYMMDD\_HHMMSS.txt**: A text file providing a summary report of the analysis, including key statistics, correlations, and a breakdown of built-up percentages per zone ## Step-by-Step Analysis ### 1. Initialize Earth Engine Authenticate and initialize the Google Earth Engine API to enable data access. ### 2. Define Area of Interest (AOI) Specify the geographical region for the analysis, in this case, a rectangle near Manaus, Amazon River. ### 3. Load Datasets Import the HydroRIVERS dataset for river networks and the GHSL Built-up Surface dataset for urbanization data from Earth Engine. ### 4. Filter Rivers Clip and filter the global HydroRIVERS dataset to retain only the river segments within the defined AOI. ### 5. Create Buffer Zones Generate non-overlapping buffer rings around the filtered river segments at specified distances (e.g., 0-100m, 100-200m, etc.). ### 6. Extract Urbanization Metrics For each buffer zone, calculate descriptive statistics (mean, standard deviation, min, max, pixel count) of the built-up surface percentage using the GHSL data. ### 7. Create Results DataFrame Organize the extracted urbanization metrics into a pandas DataFrame, adding columns for distance ranges and midpoints for easier analysis. ### 8. Generate Buffer Map Image Create a static thumbnail image from Earth Engine visualizing the defined buffer zones and rivers within the AOI, with distinct colors for each zone. ### 9. Visualize Gradient Generate a multi-panel plot including a line plot of urbanization intensity vs. distance, a bar chart of built-up percentages per zone, a scatter plot of area vs. built-up, and the generated buffer map image. ### 10. Perform Statistical Analysis Calculate key statistics, such as correlation between distance and built-up density, and the average gradient slope, to quantify the urbanization pattern. ### 11. Export Results Save the detailed results DataFrame to a CSV file, and generate a comprehensive summary report as a text file in a dedicated output folder. ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Watershed Urban Impact Analysis Source: https://docs.nikaplanet.com/industrial-solutions/watershed-urban-impact-analysis Assess the degree of urbanization within individual watersheds and classify them based on urban impact levels # Watershed Urban Impact Analysis Watershed Urban Impact Analysis ## Description This analysis aims to assess the degree of urbanization within individual watersheds across a specified Area of Interest (AOI). By quantifying the percentage of built-up area within each watershed, we can classify them based on their urban impact level (e.g., Low, Moderate, High, Very High) and generate insights into human impact on these crucial hydrological units. ## Libraries Used The script leverages several powerful Python libraries for geospatial analysis, data manipulation, and visualization: * **ee** (Google Earth Engine Python API): Essential for accessing and processing vast amounts of satellite imagery and geospatial datasets on Google's cloud platform * **geemap**: A Python package built on Earth Engine and Folium that simplifies Earth Engine data visualization and interaction, especially for converting Earth Engine objects to GeoPandas DataFrames * **pandas**: A fundamental library for data manipulation and analysis, used here for working with tabular data extracted from the geospatial analysis * **geopandas**: Extends pandas to allow spatial operations on tabular data, enabling the handling of geographic data types (like polygons for watersheds) * **matplotlib.pyplot**: A widely used plotting library for creating static, interactive, and animated visualizations in Python * **matplotlib.patches**: Used for creating custom shapes for plot legends * **seaborn**: A data visualization library based on matplotlib that provides a high-level interface for drawing attractive and informative statistical graphics * **numpy**: A core library for numerical computing, used for array operations, especially in statistical calculations * **shapely.geometry.box**: For creating rectangular geometric objects * **json**: For working with JSON data (though not explicitly used for direct JSON file handling in the main flow, often useful in geospatial contexts) * **os**: For interacting with the operating system, particularly for managing file paths and creating directories * **datetime**: For working with dates and times, used here to timestamp the analysis report ## Dataset Inputs The analysis relies on publicly available datasets hosted on Google Earth Engine: ### HydroATLAS Basins (Level 8) **Source**: `WWF/HydroATLAS/v1/Basins/level08` This is a global dataset providing hierarchical hydrological basins (watersheds) at different levels of detail. Level 8 represents relatively detailed catchments. It provides the spatial boundaries of the watersheds for our analysis. ### Global Human Settlement Layer (GHSL) Built-up Surface (2020) **Source**: `JRC/GHSL/P2023A/GHS_BUILT_S` This dataset provides information on the presence and density of built-up areas. We specifically use the 2020 data to quantify urban extent within each watershed. ### HydroSHEDS Free Flowing Rivers **Source**: `WWF/HydroSHEDS/v1/FreeFlowingRivers` This dataset provides spatial information on rivers, used here primarily for contextual visualization, although not directly used in the urban impact calculation. ## Output Files Upon successful execution, the script generates several output files in the specified `output_dir` (e.g., `watershed_urban_analysis_results`): * **watersheds\_urban\_analysis.geojson**: A GeoJSON file containing the watershed geometries along with all calculated urban metrics and impact classifications * **watersheds\_urban\_analysis.shp**: A Shapefile (a common geospatial vector data format) containing the same watershed data as the GeoJSON * **watershed\_urban\_analysis\_comprehensive.png**: A high-resolution PNG image presenting a multi-panel visualization, including choropleth maps, histograms, pie charts, and scatter plots of the analysis results * **watershed\_urban\_statistics.png**: A high-resolution PNG image focusing on detailed statistical visualizations, such as box plots, cumulative distributions, and a summary table * **analysis\_report.txt**: A plain text file summarizing key statistics, impact classifications, and analysis details ## Step-by-Step Implementation ### 3.1. Initialization and Earth Engine Setup Import libraries, authenticate Earth Engine using service account credentials, and create output directory structure. ### 3.2. Defining the Analysis Class Create `WatershedUrbanAnalysis` class encapsulating data loading, metric calculations, classification algorithms, download operations, visualization generation, and comprehensive reporting functionality. ### 3.3. Executing the Data Processing & Download Instantiate analyzer object with defined AOI and execute `run_complete_analysis()` to trigger cloud-based computations and local data downloads. ### 3.4. Generating Comprehensive Visualizations Create multi-panel visual summaries including choropleth maps, impact classifications, statistical histograms, categorical distributions, and correlation scatter plots. ### 3.5. Generating the Analysis Report Consolidate key findings, statistical summaries, and analytical insights into structured text-based report for documentation and interpretation. ## Analysis Results & Discussion ### Summary of Findings Present average urban coverage metrics, watershed impact category distributions, spatial pattern analysis, and correlation insights from scatter plot relationships. ### Interpretation of Impact Classes Define impact classification thresholds and contextualize low/moderate/high impact categories within urban coverage framework. ### Limitations Acknowledge GHSL resolution constraints, HydroBASINS delineation accuracy limitations, and impact threshold definition assumptions. ***

🚀 Ready to implement this solution?

Access the complete code, step-by-step instructions, and interactive notebook in Nika Hub.

View Full Solution →
# Autonomous Analysis Source: https://docs.nikaplanet.com/nika-desktop/autonomous-analysis How NIKA plans, runs tools, inspects results, and iterates on its own until your geospatial task is complete. ## An Analyst, Not a Chatbot Most AI tools answer a question and stop. NIKA Desktop works the way a human analyst does: it takes a goal, breaks it into steps, runs the tools needed to make progress, looks at what came back, and keeps going until the job is actually done. You describe the outcome you want in plain language — NIKA figures out and executes the path to get there. NIKA Desktop running an autonomous, multi-step geospatial analysis with streaming tool calls ## The Agentic Tool Loop NIKA operates in an **agentic tool loop** — it autonomously reads files, executes geospatial operations, inspects the results, and iterates until the task is complete. NIKA interprets your request in plain language and decides which data and operations the task requires — no menus, no scripting. It opens your files and inspects them — layers, coordinate reference systems, attribute schemas, raster bands and statistics — to ground the analysis in what's actually there. NIKA calls the geospatial tools needed to make progress, from format conversion to spatial operations, and pulls in external or satellite data when the task calls for it. It reads the output of each step, checks whether it answers the question, and adjusts its plan — re-running or trying a different approach until the result holds up. When the work is done, NIKA hands back the answer along with the artifact you need — a map, dashboard, chart, or report — rendered directly in the conversation. ## Built for Real Work Every tool the agent runs streams in real time, so you always know exactly what NIKA is doing and can verify each step of its reasoning. NIKA keeps track of long, multi-stage tasks on its own — chaining operations together and carrying context from one step to the next without losing the thread. Unlike a generic agent, NIKA understands real coordinates and ties every intermediate result back to a real-world place, asset, or geometry. Conversations are saved to disk, so you can pick any prior analysis back up exactly where you left off — including the steps the agent already ran. ## Grounded in Your Knowledge Autonomous analysis gets sharper when the agent can draw on what your organization already knows. Connect [NIKA Memory Core](/nika-desktop/memory-core) and NIKA grounds its answers in your own reports, surveys, and records — so the analysis reflects your institutional knowledge, not just public data. # Data & Conversion Source: https://docs.nikaplanet.com/nika-desktop/data-and-conversion Connect your files and external or satellite data sources, then inspect and convert across 100+ geospatial formats — all from chat. ## Bring Your Own Data NIKA Desktop meets your data where it already lives. Point the agent at the files and systems your team uses every day, and it reads them in place — no migration, no reformatting, no manual tagging. NIKA Desktop connecting to files and converting between geospatial formats from the chat Reports, PDFs, drawings, field photos, spreadsheets, and raw geospatial datasets — drop them in and the agent works directly with them. Pull in the external and satellite data sources your industry already relies on to enrich the analysis with up-to-date context. ## Data Inspection NIKA includes built-in tools for inspecting geospatial data without leaving the chat. * **Vector metadata** — read layers, coordinate reference systems, and attribute schemas from any supported vector format * **Raster metadata** — read dimensions, band counts, CRS, and statistics from any supported raster format ## Format Conversion (100+ Formats) Convert between formats with a single request to the agent — no GIS desktop software required. | Category | Formats | | - | - | | **Raster** | COG, GeoTIFF, JPEG2000, ECW, MrSID, PNG, JPEG | | **Vector** | GeoJSON, Shapefile, GeoPackage, FlatGeoBuf, GeoParquet, KML, KMZ, CSV, DXF | | **Vector Tiles** | PMTiles, MBTiles | | **3D** | LAS, LAZ, Cesium 3D Tiles, COPC, STL, OBJ, GLB, glTF | | **Styles** | SLD, QGIS QML | Conversions happen inside the [autonomous tool loop](/nika-desktop/autonomous-analysis) — so a single request like *"convert these shapefiles to GeoParquet and map the result"* is handled end to end, with the output ready to [visualize](/nika-desktop/visualizations) immediately. # NIKA Memory Core Source: https://docs.nikaplanet.com/nika-desktop/memory-core Turn your org-level geospatial data such as species distribution, soil analysis, etc into a knowledge base that any user with granted access can query using AI. ## Overview **NIKA Memory Core** turns years of accumulated specialised knowledge into a queryable, spatially-aware knowledge base — the enterprise brain that remembers everything your organization has ever learned about the places it works. Ingest your documents and NIKA builds a knowledge layer that understands *what* your organization knows and *where* it applies geographically. Any team member — from a new graduate to a project director — can ask questions in plain language and get answers grounded in your organization's own data. ## Example Queries
Have we done any Phase 1 habitat surveys within 2km of this site?
ChatGPT ChatGPT
Phase 1 Habitat Surveys are used to identify habitats that may support protected species. To find out if your organization has previously surveyed a site, you would need to check your internal project records or document management system. Local ecological data may also be available through Natural England or your local records centre.
That's not what I'm asking — I need to know if WE have already surveyed this specific location, not general advice on where to search.
N
NIKAMemory Core
Yes — 3 Phase 1 surveys from your archive cover this area. The most recent was March 2022 for the Thornfield Solar Project (ref: TS-2022-HAB-01). Two species of concern were flagged: marsh harrier nesting habitat and great crested newt receptor zones. Sources: TS-2022-HAB-01 p.14, BW-2019-EC-07 p.6
SURVEYS FOUND WITHIN 2KM
Survey Ref Date Project Species Flagged
TS-2022-HAB-01 Mar 2022 Thornfield Solar Marsh Harrier, GCN
BW-2019-EC-07 Jun 2019 Broadwood Residential Water Vole
AM-2017-PH1 Sep 2017 Ashmill Road Upgrade Bat Roosts, Otter
Can you show me where we've recorded great crested newts in the Thornfield area and map the survey points?
ChatGPT ChatGPT
Great crested newts (Triturus cristatus) are a European Protected Species typically surveyed using torch, bottle-trap, and eDNA methods. To map your records, you would need to export survey coordinates from your ecology database into a GIS tool such as ArcGIS or QGIS, then visualise the points against a base map.
I don't need a GIS tutorial — I need to see where OUR team has actually found them, mapped right now from our own survey files.
N
NIKAMemory Core
4 GCN records in your Thornfield archive: 2 confirmed breeding ponds (Pond A: SU456214, Pond B: SU453219) and 2 terrestrial buffer habitat zones, both mapped Jun 2022. No confirmed presence in the northern field sections. Sources: TS-2022-GCN p.8, TS-2022-HAB-01 p.12
GCN SURVEY RECORDS — THORNFIELD AREA
THORNFIELD LANE
Pond A
Pond B
SU456214
SU453219 No GCN records (northern fields)
N
+
−
GCN confirmed record
Breeding pond
I'm on site at the B4440/Millbrook Road junction. What buried services have our own surveys already recorded along this access road alignment?
ChatGPT ChatGPT
Before any excavation, you should request a utility search through a service like LSBUD or Dial Before You Dig, and contact individual utility providers. On-site CAT scanning is also recommended. Always follow HSG47 safe digging practices to avoid utility strikes during groundworks.
I know the standard process. My plant operator is here now — I need to know what OUR previous investigations already found on this specific corridor, not how to start a new search.
N
NIKAMemory Core
Your 2019 Phase 1 ESA for this corridor recorded a 150mm water main (Severn Trent, laid 1987) crossing at chainage 340m, and a BT duct running parallel for \~180m from the junction. Sources: ESA-2019-UTIL p.22, Drawing UTL-04
ACCESS ROAD ALIGNMENT — UTILITY SCHEMATIC
Junction
End
ch. 340m
BT duct (\~180m from junction)
150mm water main crossing (ch. 340m)
What ground conditions were found in the boreholes along this route?
ChatGPT ChatGPT
Borehole logs provide information on soil stratigraphy, groundwater levels, and potential contamination. To access specific borehole data for your route, check your project's geotechnical investigation reports. The British Geological Survey (BGS) also provides publicly available borehole records for many locations in the UK.
The reports are back in the office. I'm the engineer and I need a synthesised answer from our own investigation data right now — not a pointer to go look it up myself.
N
NIKAMemory Core
7 boreholes from the 2021 geotechnical investigation cover this route. Fill material (0.8–2.3m depth) was found in BH-03 to BH-06, likely from a demolished structure. Groundwater struck at 1.4m in 3 locations. Low-to-moderate contamination risk flagged. Sources: GI-2021-GEOTECH p.18–24
BOREHOLE SUMMARY — 2021 GEOTECHNICAL INVESTIGATION
BH Fill Depth Stratigraphy GW Strike
⚠ BH-03 to BH-06: made ground present — low-to-moderate contamination risk flagged
What's the water quality trend at monitoring point WQ-07 over the last five years?
ChatGPT ChatGPT
Water quality trends are assessed by comparing measured parameters — nitrate, phosphate, pH, dissolved oxygen — against baseline values over time. To analyse a specific monitoring point, compile readings from your monitoring records and plot them against relevant standards such as WFD targets. The Environment Agency's Water Quality Archive may also hold relevant data.
I need the actual numbers from our monitoring files — not a description of methodology. What do OUR readings at WQ-07 actually show?
N
NIKAMemory Core
22 monitoring events at WQ-07 (2019–2024) show nitrate levels consistently above 50mg/L since Q3 2021. Peak was 78mg/L in autumn 2022, coinciding with high rainfall. Sources: WQ-Annual-2022 p.11, WQ-Annual-2023 p.9, +2 more
NITRATE (mg/L) AT WQ-07 — ANNUAL AVERAGE
Below limit
Above 50mg/L limit
50mg/L threshold
I'm doing field work at OS grid SP234567. Which of OUR monitoring points are within 2km and what are their latest readings?
ChatGPT ChatGPT
To identify monitoring points near your current location, you would need to run a 2km buffer around your coordinates in a GIS tool such as ArcGIS or QGIS, then overlay this against your monitoring network dataset. Your data management team should be able to run this query and cross-reference the latest readings for you.
I'm in the field without GIS access. I just need to know what OUR nearest monitoring points are and whether anything near me is flagged — right now.
N
NIKAMemory Core
3 of your monitoring points are within 2km of SP234567: WQ-07 (1.2km NE) is flagged — nitrate above limit since 2021; WQ-12 (1.8km SW) is within WFD targets; WQ-03 (2.0km NW) has elevated phosphate flagged in the 2023 annual report. Sources: WQ-Annual-2024 p.5, WQ-Annual-2023 p.11
MONITORING POINTS WITHIN 2KM OF SP234567
Point Distance Latest Reading Status
WQ-07 1.2km NE Nitrate 63 mg/L Flagged ↑
WQ-12 1.8km SW All params OK — Oct 2024 Within limits
WQ-03 2.0km NW Phosphate 0.12 mg/L Elevated ⚠
Has this site had any previous planning applications and what were the outcomes?
ChatGPT ChatGPT
Planning history for a site can be found on your local planning authority's online portal or the national Planning Portal at planningportal.co.uk. Search by address or coordinates to return all historical applications and decisions. For enforcement history, check the authority's published enforcement register.
Our archive has internal officer notes and enforcement records not published on the public portal. I need what's in OUR files for this address.
N
NIKAMemory Core
4 planning records in your archive: 2008 outline approval for 12 dwellings (08/0341/OUT), 2011 reserved matters approval, 2016 S73 variation (approved), and a 2019 enforcement notice for unauthorised storage use (resolved 2020). Sources: Planning Register, Enforcement Log 2019–2020
PLANNING HISTORY TIMELINE
I'm reviewing a new application at grid ref TL456789. What planning constraints and environmental objection history do OUR records show within 500m?
ChatGPT ChatGPT
To check planning constraints for a specific location, use your local planning authority's online mapping portal or Natural England's MAGIC map for environmental designations. Most local authorities also publish constraint layers as part of their Local Plan evidence base, which can be queried by coordinate.
I need what's in OUR internal records — our constraint maps, determinations we've made, and any objections we've received or issued in this area. Not public portals.
N
NIKAMemory Core
Within 500m of TL456789 your records flag: Grade II listed building (The Old Mill) 0.2km NW; TPO area on eastern boundary (TPO-2018-07) 0.1km E; Zone 2 flood risk along southern edge. Adjacent Zone 4B consultation also drew 3 statutory objections — SSSI risk, flood plain, and heritage assessment. Sources: TPO-Register-2018, Conservation-Map-2019, Zone4B-Summary-2022
CONSTRAINTS WITHIN 500m OF TL456789
Distance Constraint Type Source
0.1km E TPO Area — TPO-2018-07 Tree Preservation TPO-Register-2018
0.2km NW Grade II Listed — The Old Mill Heritage Conservation-Map-2019
S boundary Flood Zone 2 along southern edge Flood Risk FloodMap-2022
Adjacent Zone 4B — 3 statutory objections on record Prior Objections Zone4B-Summary-2022
## What It Solves ### Before NIKA Memory Core * A junior ecologist needs to know if a site was previously surveyed — they email three colleagues and wait two days for an answer * A project manager needs historical soil data for a planning application — they dig through a shared drive with 15 years of nested folders * A field team arrives on site with no context on prior work — they spend the first day re-discovering what was already known * When the most experienced team member is unavailable, critical project questions stall ### With NIKA Memory Core * The junior ecologist asks *"Have we done any Phase 1 habitat surveys within 2km of this site?"* and gets a sourced answer in seconds * The project manager asks *"What geotechnical reports do we have for developments along this river corridor?"* and gets a summary with document links * The field team asks *"What species were recorded here in previous seasons?"* and gets species lists with survey dates and locations * Every team member has access to the collective experience of the entire organization NIKA Memory Core ## Key Features ### Ingest Any Format Drop in the documents your team already has. Memory Core processes PDFs, Word documents, spreadsheets, CSVs, GeoJSON, shapefiles, and more. No reformatting or manual tagging required — the AI extracts structure, entities, and spatial references automatically. ### Spatial Awareness Knowledge isn't just text — it's tied to places. Memory Core understands that a bat survey report relates to a specific site boundary, that a soil analysis covers a particular set of boreholes, and that a flood risk assessment applies to a defined catchment area. When you ask a question, it knows which knowledge is geographically relevant. ### Source Traceability Every answer includes citations to the original documents — page numbers, report titles, and dates. Your team can always verify the AI's response against primary sources. This is critical for regulatory submissions and audits where provenance matters. ### Team-Wide Access Memory Core is shared across your team. Documents ingested by anyone are available to everyone with access. Field teams, desk-based analysts, and project managers all draw from the same knowledge base — eliminating information silos and duplicated effort. ### Continuous Learning Memory Core grows with your organization. As new surveys are completed, new reports filed, and new datasets acquired, they are ingested automatically. Your knowledge base stays current without manual curation. ## See How Indexing Works When Memory Core ingests your files, it places everything on a shared spatial index — an [H3](https://h3geo.org/) hex grid — and links related documents into a knowledge graph. This interactive demo runs that index over a real file set: switch between the **Map** and **Graph** views, and change the H3 resolution to watch files cluster at different scales.