Re: [Geotools-devel] FeatureJSON with complex properties

2015-10-05 Thread Pedro Trujillo Brito
Ok. It's not my priority right now, but if I work on that I'll submit the complex parser. Thank you so much! 2015-10-05 8:55 GMT+01:00 Jody Garnett : > You need to make a copy of the parser and write the code. please > contribute back as it sounds like a useful change :) > > On Mon, Oct 5, 2015

Re: [Geotools-devel] FeatureJSON with complex properties

2015-10-05 Thread Jody Garnett
You need to make a copy of the parser and write the code. please contribute back as it sounds like a useful change :) On Mon, Oct 5, 2015 at 12:53 AM Pedro Trujillo Brito wrote: > I'm trying to use Feature instead of SimpleFeature, but > FeatureJSON.readFeature > only returns a SimpleFeatureImpl

Re: [Geotools-devel] FeatureJSON with complex properties

2015-10-05 Thread Pedro Trujillo Brito
I'm trying to use Feature instead of SimpleFeature, but FeatureJSON.readFeature only returns a SimpleFeatureImpl (as Jody said). The complex properties may have different inner properties, so it would be useful getting them as a Map. How can I parse the geoJson in a (not simple) Feature? Thanks!

Re: [Geotools-devel] FeatureJSON with complex properties

2015-10-05 Thread Jody Garnett
You would need to revisit the code to create a "complex feature", so the data structure exists but it is not supported by the parser as it stands now. Specifically in this case you want to create a ComplexAttribute "otherProp" to hold the attributes "id" and "name". I do not know if you always ex

Re: [Geotools-devel] FeatureJSON with complex properties

2015-10-05 Thread Andrea Aime
On Mon, Oct 5, 2015 at 9:18 AM, Pedro Trujillo Brito wrote: > Hi, I'm trying to read some geoJson features which includes properties > with nested json. > > For example: > > { > "type": "Feature", > "geometry": { > "type": "Point", > "coordinates": [ > 100.1, >

[Geotools-devel] FeatureJSON with complex properties

2015-10-05 Thread Pedro Trujillo Brito
Hi, I'm trying to read some geoJson features which includes properties with nested json. For example: { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 100.1, 0.1 ] }, "properties": { "id": 123, "ot