Opened 7 years ago
Closed 6 years ago
#6781 closed defect (invalid)
CARTO: Issue with GDAL 2.1.2 and the_geom_webmercator column
Reported by: | smongon | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | carto, cartodb |
Cc: | rtorre, roualt |
Description
From Stephanie Mongon
scenario to reproduce
Use CSV that already contains a the_geom column with WKT.
Try to import the CSV with ogr2ogr
and Carto driver. :
ogr2ogr --config CARTO_API_KEY myapikey -nln "from_csv" -t_srs "EPSG:4326" -f Carto "Carto:myaccountname" california_cities_points3.csv
expected behavior
A the_geom_webmercator
(srid: 3857) column is created and populated based on the_geom
(srid: 4326).
actual behavior
No the_geom_webmercator
column is created.
additional information
Similar issue with shapefiles was fixed: https://trac.osgeo.org/gdal/ticket/6565
So this works in GDAL 2.1.2 for .shp:
ogr2ogr --config CARTO_API_KEY myapikey -nln "from_shp" -t_srs "EPSG:4326" -f Carto "Carto:myaccountname" california_cities_points3.shp
Table creation & population test performed via CARTO SQL API (outside of driver) does create a the_geom_webmercator column for CSVs:
- CREATE TABLE
- Cartodbfy it https://github.com/CartoDB/cartodb/wiki/creating-tables-though-the-SQL-API
- INSERT CSV's WKT values into created table's the_geom column
Attachments (1)
Change History (4)
by , 7 years ago
Attachment: | california_cities_points3_csv_shp.zip added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | 2.2.0 |
---|
comment:3 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
By default, the CSV driver will not recognize this CSV file as a spatial one, and thus the the_geom column will be dealt as a non geometric column. Hence the absence of a the_geom_webmercator column.
The wished behaviour can be gotten by adding the following options to the ogr2ogr command line: