Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type guessing on import for GEOJSON #1036

Closed
saleiva opened this issue Oct 31, 2014 · 18 comments
Closed

Type guessing on import for GEOJSON #1036

saleiva opened this issue Oct 31, 2014 · 18 comments
Assignees
Milestone

Comments

@saleiva
Copy link
Contributor

saleiva commented Oct 31, 2014

We should contact the same guy that helped us with csv.
cc/ @javisantana

@javisantana
Copy link
Contributor

geojson already has types so in this case we should take care because some users could be using them.
Also there is another fact, we can't be doing this for every format, this should be something horizontal to all the format we import.

I will ask the guy who worked with us

@javisantana
Copy link
Contributor

there was another thing related with integer limits, right? cc @Kartones

@Kartones
Copy link
Contributor

Kartones commented Nov 3, 2014

Yes, it seems we're hitting int32 max value (all get converted to number 2147483647) upon importing files with really big integers, like this sample CSV:

CODE,NAME
18001030300,"aaa"
18001030400,"bbbb"

@javisantana
Copy link
Contributor

@javisantana
Copy link
Contributor

merged in ogr2ogr master

@saleiva
Copy link
Contributor Author

saleiva commented Nov 27, 2014

😃

@javisantana
Copy link
Contributor

cc @rafatower

@rafatower
Copy link
Contributor

Worth noting: in gdal trunk there must be also a patch for a segfault when imporing csv files

@saleiva
Copy link
Contributor Author

saleiva commented Dec 22, 2014

what do we do with this issue then?

@saleiva
Copy link
Contributor Author

saleiva commented Dec 29, 2014

bump!

@Kartones
Copy link
Contributor

Probably wait until @rafatower comes back from vacations... I'm kind of busy right now to do regression tests or see if everything's fine now :(

@saleiva
Copy link
Contributor Author

saleiva commented Jan 19, 2015

So, @rafatower ?

@rafatower
Copy link
Contributor

Current status:
-[x] the gdal feature is implemented and the ogr2ogr2 binary containing it is in production.
-[ ] the ruby code must make use of it, pretty much like for csv

@javisantana, what's exactly the expectation of this feature? according to doc this is the only change regarding GeoJson:

Changes in drivers
GeoJSON: can read/write OFSTBoolean

@javisantana
Copy link
Contributor

guessing on boolean and dates

@rafatower
Copy link
Contributor

The geojson specification only mentions these types:

The value of the type member must be one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", "GeometryCollection", "Feature", or "FeatureCollection". The case of the type member values must be as shown here.

Currently dates are imported correctly. Working my way through the code to enable ogr2ogr2 for geojson and boolean values.

@rafatower
Copy link
Contributor

I'm getting this error with ogr2ogr2:

2015-01-20 14:57:51 UTC: ogr2ogr output:    ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
ERROR 4: Unable to open EPSG support file gcs.csv.
Try setting the GDAL_DATA environment variable to point to the
directory containing EPSG csv files.
Failed to process SRS definition: EPSG:4326

2015-01-20 14:57:51 UTC: ogr2ogr exit code: 256

I think that means we lack one file in the deb package

@rafatower
Copy link
Contributor

To recap:

  • I had some problems with the package, but managed to fix it. The work is done here
  • The new package is uploaded to launchpad but needs a fix in gdal@trunk. Package shall be easy to update once it is fixed.
  • The bug has been reported to our gdal contact and is a BLOCKER
  • Short PR for ruby code Use ogr2ogr2 both for csv and geojson files #1036 #1906 - DONE

rafatower pushed a commit that referenced this issue Jan 22, 2015
Use ogr2ogr2 both for csv and geojson files #1036
@rafatower
Copy link
Contributor

And released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants