Skip to main content

Hi all,

I'm using the Generic Reader to read incoming data that can be one of several data formats, including GeoJSON. The problem I'm having is it seems the Generic Reader defaults to Esri JSON for files with a .json extension. This causes the workspace to fail because the GeoJSON data structure coming in is different from what is expected by the Esri JSON reader used by the Generic Reader for .json files. Is there a way I can change the defaults on the Generic Reader or do I have to modify the extension of the incoming file to .geojson?

Thanks

Rob

I suspect you'll have to rename the file, at least I don't know of any other way.

Personally I've moved away completely from the Generic reader and now only use a TestFilter followed by a FeatureReader for each format that I'm supporting.

I find that a lot more flexible and easier to maintain (less guesswork), even though it does clutter the workspace a bit.


I suspect you'll have to rename the file, at least I don't know of any other way.

Personally I've moved away completely from the Generic reader and now only use a TestFilter followed by a FeatureReader for each format that I'm supporting.

I find that a lot more flexible and easier to maintain (less guesswork), even though it does clutter the workspace a bit.

Thanks David

 

I think I'll take your suggestion. It's a nice idea having one reader for all and does make for a less cluttered workspace but I've found the Generic Reader fiddly to work with too. I'd prefer not to change the extension anyway...I've never seen a geojson with a .geojson extension.

 

 

 


If you are using a featureReader set to the Generic format, if you go into the parameters, you change change the setting from <Guess format name from extension> to point to an attribute containing the name of the desired format.

 

 

I use it in a scenario where I can accept 15 different formats, and the testFilter/specific reader scenario was becoming cumbersome.

If you are using a featureReader set to the Generic format, if you go into the parameters, you change change the setting from <Guess format name from extension> to point to an attribute containing the name of the desired format.

 

 

I use it in a scenario where I can accept 15 different formats, and the testFilter/specific reader scenario was becoming cumbersome.
Great suggestion @jdh, I'll give it a try. Thanks.

 


There goes flexibility... I'm running into a strange message from the generic reader that interprets a .json file as CESIUM3DTILES, which is not what I want. @fmelizard?


Reply