You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't get any error but the 3 "open options" that I use do not appear to have been used. The numeric fields are still parsed as strings (so the AUTODETECT_TYPE option does not seem to have been used) and no geometry is created in the resulting GeoJSON (so X_POSSIBLE_NAMES and Y_POSSIBLE_NAMES do not seem to have been used).
On the other hand, if I test with the desktop version of ogr2ogr with the command ogr2ogr -f GeoJSON cities-output.geojson cities.csv -t_srs EPSG:4326 -s_srs EPSG:4326 -lco RFC7946=YES -oo X_POSSIBLE_NAMES=lng -oo Y_POSSIBLE_NAMES=lat -oo AUTODETECT_TYPE=YES, I get the expected result (geometries are created and the type of the fields becomes numeric when detected this way).
See the attached archive (cities.zip) that contains the 3 following files if it helps:
cities.csv (the input file)
cities-output-gdal3js.geojson (the output from gdal3.js)
citites-output-desktop-ogr2ogr.geojson (the output from the desktop version of ogr2ogr)
The text was updated successfully, but these errors were encountered:
In fact the open options should be passed as an argument to the OpenEx function (wrapped by the Gdal.open JS function) which doesn't seem to be supported yet.
I will try to submit a PR soon.
Hi,
Are the "open options" of ogr2ogr supported?
I tried to use them without success like this:
I don't get any error but the 3 "open options" that I use do not appear to have been used. The numeric fields are still parsed as strings (so the
AUTODETECT_TYPE
option does not seem to have been used) and no geometry is created in the resulting GeoJSON (soX_POSSIBLE_NAMES
andY_POSSIBLE_NAMES
do not seem to have been used).On the other hand, if I test with the desktop version of ogr2ogr with the command
ogr2ogr -f GeoJSON cities-output.geojson cities.csv -t_srs EPSG:4326 -s_srs EPSG:4326 -lco RFC7946=YES -oo X_POSSIBLE_NAMES=lng -oo Y_POSSIBLE_NAMES=lat -oo AUTODETECT_TYPE=YES
, I get the expected result (geometries are created and the type of the fields becomes numeric when detected this way).See the attached archive (cities.zip) that contains the 3 following files if it helps:
The text was updated successfully, but these errors were encountered: