Skip to main content

Hello,

I am working on a workflow that extracts GEO data from an
ESRI GEO database to a GEOJson file that has to be imported into Socrata.

The issue I encounter is that my (in FME generated) GEOJson
file apparently doesn't apply to the GEOJson standards.

Checking this file on geojsonlint.com I mostly get errors
that features don't follow the right-hand-rule or GEOJson structure errors.
(type member required)

Importing this GEOJson file into Socrata goes wrong. (But
when I import the GEOJson into QGiss and save it again as GEOJson there is no
issue importing this into Socrata.)

I've been debugging and testing for a while now but can't
figure out what I'm doing wrong. I can only think about 2 things.

Am I using the Orientor correctly?

I use the OrientationExtractor to determine the orientation.
Then I use a Tester to get only the left-hand-ruled features. With a the
Orientor I convert these left-hand-ruled features to right-hand-ruled ones.
Settings of the Orientor are:

Orientation Type:Reverse and Flip Appearances: Yes. I tried
other settings of the Orientation Type (left / right-hand-rule) but it seems
that the features aren't converted properly.

Can someone tell me If I am doing something wrong in the
Orientor here?

An other thought is if the GEOjson writer itself could make
some errors here?

Can anyone give me some clues here?

How big is your resulting GeoJson file? Do you get any error messages when importing the GeoJson file?

I would try to put a Sampler and (severely) limit the number of geometries used for your testing purposes. For example, start with just one single geometry. Does that work? Great, then try another 5, etc. Once you find a geometry that fails, try to isolate it into it's own file and pass it through QGis and compare the before/after files to see what's changed.

There's a very good and easy to follow description of the GeoJson format here, in case you have to dive into the file itself: https://macwright.org/2015/03/23/geojson-second-bite

Also, you can probably skip the OrientationExtractor and the Tester_5, just set the Orientor to right-hand rule (this is just a recommendation, not a hard criteria for GeoJson).


How big is your resulting GeoJson file? Do you get any error messages when importing the GeoJson file?

I would try to put a Sampler and (severely) limit the number of geometries used for your testing purposes. For example, start with just one single geometry. Does that work? Great, then try another 5, etc. Once you find a geometry that fails, try to isolate it into it's own file and pass it through QGis and compare the before/after files to see what's changed.

There's a very good and easy to follow description of the GeoJson format here, in case you have to dive into the file itself: https://macwright.org/2015/03/23/geojson-second-bite

Also, you can probably skip the OrientationExtractor and the Tester_5, just set the Orientor to right-hand rule (this is just a recommendation, not a hard criteria for GeoJson).

Thank you
for the suggestions. My resulting GeoJson is about 8Mb.

 



I checked
the geodata feature by feature. This triggered the left/right-hand-rule issues.
Disabling the OrientationExtractor and the Tester_5
gives me a “Line 1: "type" member required” error when checking the
GEOJson. Then I get
no error messages when importing into Socrata, and I end up with a worldmap
without geometry.

 

 


Thank you
for the suggestions. My resulting GeoJson is about 8Mb.

 



I checked
the geodata feature by feature. This triggered the left/right-hand-rule issues.
Disabling the OrientationExtractor and the Tester_5
gives me a “Line 1: "type" member required” error when checking the
GEOJson. Then I get
no error messages when importing into Socrata, and I end up with a worldmap
without geometry.

 

 

Could you possibly upload a sample file demonstrating this error here?

 


Could you possibly upload a sample file demonstrating this error here?

 

In
the meantime I have done some other tests with te GeometryExtractor. No luck either.

 


I’m also having contact with Socrata concerning this issue. I’ve added the output
geojson.

 

 


Currently there is a problem with the GeoJSON writer when writing multiple feature types. The workaround for now is to use one feature type per dataset, or use dataset fanout. A more comprehensive solution is planned for 2018.1. For more info see: https://knowledge.safe.com/articles/40806/workarounds-to-known-issues-in-fme-20170.html


Currently there is a problem with the GeoJSON writer when writing multiple feature types. The workaround for now is to use one feature type per dataset, or use dataset fanout. A more comprehensive solution is planned for 2018.1. For more info see: https://knowledge.safe.com/articles/40806/workarounds-to-known-issues-in-fme-20170.html

Thank you for this information, this makes my rpoblem perfectly clear!

 

 


Currently there is a problem with the GeoJSON writer when writing multiple feature types. The workaround for now is to use one feature type per dataset, or use dataset fanout. A more comprehensive solution is planned for 2018.1. For more info see: https://knowledge.safe.com/articles/40806/workarounds-to-known-issues-in-fme-20170.html

How can I get status updates on this solution?

 

 


Reply