GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.41k stars 1.11k forks source link

Column name: "geom" vs. "geometry" #12193

Open erikamariano opened 2 months ago

erikamariano commented 2 months ago

Expected Behavior

Check any layer in database, the column name for the geometry type has to be the same for all tables: "geom". This should happen for all kinds of files: GeoJSON, Shapefile, etc.

Actual Behavior

Steps to Reproduce the Problem

  1. Add a GeoJSON file by the user interface
  2. Check the table of this layer in the database
  3. The column name will be "geometry"
  4. Compare it to a layer that was created with a Shapefile or Geopackage

Specifications

mattiagiupponi commented 2 months ago

@erikamariano i was checking the code, and for shapefiles, the column name should be converted in geometry since is passed as parameter. Anyway there are a couple of handlers that not define the colum in the ogr2ogr command so is ogr to decide the column name. we can make it equal for all the handlers