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

Issue: Failed to upload either a geojson or a .zip with shape file #44

Closed
antobenve opened this issue Jul 20, 2017 · 6 comments
Closed
Labels
bug done Issue fixed / feature added

Comments

@antobenve
Copy link
Collaborator

Expected Behavior

It should load it

Current Behavior

Right after the drop on the map, an error occurred.
The original file is meant to be in WGS84 (from metadata) but it's coordinate system was actually undefined.
So, after manipulating the file with ArcGis and dragging it in Map-X I got an error that stated something like "the extension of the data is wrong".
With Thomas I tried to define its coord system on QGIS and we still got an error. This time it was just stated to check the console.
As last try, we have saved the file as geojson on QGIS but we still got the same error to be checked in the console.

Steps to Reproduce

  1. I attached the geojson with defined coord system. Can you please check what is the error when loading it in @MAP-X?

all_bphs.zip

...

Detailed Description

@fxi
Copy link
Member

fxi commented Jul 20, 2017

The file contains some NULL geometry.
This valid geojson according to spec (http://geojson.org/geojson-spec.html#feature-objects) but not what I expected.

So, what do you think:

Option a: Features without geometry will be ignored, as they are useless in all mapping application.
Option b: Features without geometry will be skipped during validation, but will be present in the database.

@antobenve
Copy link
Collaborator Author

I think option A is just fine.
Thanks Fred. Can you load the file then?

@fxi
Copy link
Member

fxi commented Jul 20, 2017

Yeah. I found hack for now.

The solution was to find the main geometry type in the whole object (multi geometry is not yet supported), and update the features without geometry (null) with that type and an empty coordinates array.

So, we don't remove data, and turf.meta.bbox does not complaint.

It seems to be a bug from turf, I think. I've posted an issue there Turfjs/turf#853

I've pushed a patch and this will be available in the next update.

@fxi fxi added bug done Issue fixed / feature added labels Jul 20, 2017
@antobenve
Copy link
Collaborator Author

How did you do? Did you upload the file yourself at the end? Cause I cannot see it in the platform.
I would like to know how to correct these issues because I have another file with the same problem actually. Can you tell me how to do it please?

@fxi
Copy link
Member

fxi commented Jul 30, 2017

Sorry, missed your last comment.

So, I don't do anything with your data on the online platform.

I'm trying to solve the issue you had, but I will not do anything else here, unless I say so.

For the record, this is now solved :
Turfjs/turf#866
How quick !

As soon as this is released, I will fetch the new version and remove my hack (not yet on the online platform, though).

As soon as it's online and ready, I will notified you here and we can close this,

@antobenve
Copy link
Collaborator Author

Ok, Thanks for notifying me.
Antonio

fxi added a commit that referenced this issue Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done Issue fixed / feature added
Projects
None yet
Development

No branches or pull requests

2 participants