Satshot-API
[ class tree: Satshot-API ] [ index: Satshot-API ] [ all elements ]
Prev Next

Vectors, Exports and Reports

Creating exportable data and PDF reports

Avi Blackmore Head Programmer/Administrator 2013 Agri ImaGIS Technologies, Inc.

Table of Contents

Simple Formats

Analyses and edited images can be viewed as map layers, but to be useful for precision agriculture, or for use in other GIS systems, they need to be downloadable. This "exporting" functionality is provided by several methods. The first, export_image_in_simple_format() (or export_multiple_images_in_simple_format()), simply transforms the analysis or edited image into a raster format suitable for GIS work. In many cases, these are simple images, such as BMPs, JPEGs, or PNGs, with or without an accompanying "world file" which provides basic geospatial location data. GeoTIFF, with the geospatial data encoded in the TIFF tag directory, is also available, as is Google Earth's KMZ file. In many cases, these files are actually provided as ZIPs, because they contain multiple files (the PNG and the world file, for instance, with PNGW). These formats are useful for many applications, though because they lack attributes for the zones, they are not suitable for precision agriculture.

Vectors

The Satshot API supports creating and working with various vector datasets, which can be used for precision ag as well as other GIS and agricultural uses. They can contain any number of attributes (clients are advised to set a reasonable limit, such as 20), and can be viewed on the map context directly, just as a saved analysis or edited image can be. There are several vector types. Vector spreadmaps are polygon vectors created by tracing the pixel patterns in an analysis or edited image; the method to create them is create_vector_spreadmap_from_image() (or create_multiple_vector_spreadmaps_from_images()). Alternatively, point vector maps can be made from analyses or edited images, with one point feature for every pixel in the source image: these are created using the method create_point_vector_from_image() (or create_multiple_point_vectors_from_images()).

Aside from vectorized rasters, there are several other vector datasets supported: soilmaps (create_soilmap_vectors_for_boundaries()), arbitrary point sets for use as test points (create_testpoint_vector_from_map_coordinates() or create_testpoint_vector_from_pixel_points()), and polygon grids (create_grid_vector_for_boundary()). These vectors are not directly tied to analyzed satellite imagery, but can be useful for working with such analyses.

All vector types use the same methods for displaying and manipulating them. Vectors are displayed using the method create_vector_display_layer() (or create_multiple_vector_display_layers()), and removed from the map using remove_vector_display_layer() (or remove_multiple_vector_display_layers()). The current attributes of a vector can be queried using get_vector_attribute_table() (or get_multiple_vector_attribute_tables()), and metadata about a vector can be retrieved with get_vector_metadata() (or get_multiple_vectors_metadata()). A vector's attributes can be modified with add_attributes_to_vector(), set_attributes_for_vector(), and delete_attributes_from_vector(). Vectors can be saved permanently to a geospatial object using save_vector_to_object() (or save_multiple_vectors_to_multiple_objects()). Finally, vectors can be downloaded in a vector format (such as ESRI Shapefile or GML) using export_vector_table() (or export_multiple_vector_tables()). All of these methods work identically on all vector types, so once the vectors are created, client programs need not write separate code paths for handling them.

Processed Imagery

Raw images can also be exported, in a processed format but without any classification, for use in software that can perform its own classification. The method to do this is export_image_in_processed_format() (or export_multiple_images_in_processed_format()). This method supports three processes to apply to the raw image: "RESCALE", which converts the bands of the raw image to 8-bit (this is mostly significant for RapidEye, which is 16-bit), "NDVIR", which creates a raw, unclassified NDVI-Red band, and "NDVIG", which does the same as NDVIR, but with the NDVI-Green algorithm. The resulting image is then transformed into a specified format, which can be either a raster or vector format.

Method Reference

Exporting:

Vector creation: Vector display and manipulation:

Prev Up Next
Scenes and Analysis Understanding and Using the Satshot Services API, Version 2 Geotagged Photos

Documentation generated on Wed, 19 Aug 2026 18:55:24 -0500 by phpDocumentor 1.4.4