Vector Basic
Vector Basic AIKP provides functionality to publish and visualise shapefile and GeoJSON vector data in webUI.
Features
Input shapefiles (.shp) or GeoJSON format
Preserve geometry and attribute information
Support for all common shapefile geometry types (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon)
Customizable output file naming
Integration with OCLI’s COS storage system
Prerequisite
rsync to your OCLI home folder input data (shapefile or geojson vector data)
CLI workflow
Create a project (if required)
create -n project_name -a
Create Task.
task create -t ocli.aikp.vector_basic -n task_name --activate
Set input vector file
task set file_path=/path/to/my/shapefile.shp
Optional: Output of this command is tabular view of data parameters (attribute table)
task template inspect
Optional: Select the column that will be used for grouping, default is “index” (every record will be colored separately)
task set group_by_column=<column name>
Optional: Configure the colormap. Default `”terrain_r”. If user input is invalid, a list of valid options will be printed to screen. The list of available colormaps can be found here https://matplotlib.org/stable/gallery/color/colormap_reference.html
task set colormap=<colormap name>
Optional: Configure alpha/transparency channel, with 0 completely transparent and 1 not-transparent. The default is 0.5.
task set alpha=<float[0, 1]>
task make recipe
ai makegeojson
ai upload
ai publish post
Implementation Details
The module reads shapefiles using GeoPandas and converts them to GeoJSON format. Each feature in the shapefile is saved as a separate GeoJSON file, maintaining its properties and geometry. The module supports all common shapefile geometry types and handles attributes from the shapefile.
Dependencies
GeoPandas
Shapely
OCLI core libraries