On Thu, Jun 14, 2012 at 4:57 AM, Alexandre Djioev <dji...@gmail.com> wrote:
> Hi everyone,
>
> Assume I will do a getFeature query to multiple layers, something like this:
>
> http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_cities,topp:tasmania_roads&propertyName=(ADMIN_NAME,CITY_NAME)(TYPE)
>
> I get following response, and you can see that feature includes info about a
> layer it came from, in this case topp:tasmania_cites:
>
> <gml:featureMember>
> <topp:tasmania_cities fid="tasmania_cities.1">
> <topp:CITY_NAME>Hobart</topp:CITY_NAME>
> <topp:ADMIN_NAME>Tasmania</topp:ADMIN_NAME>
> </topp:tasmania_cities>
> </gml:featureMember>
>
> If I do the same for json request by adding optuputFormat=json parameter I
> get:
> features":[{"type":"Feature","id":"tasmania_cities.1","geometry":null,"properties":{"CITY_NAME":"Hobart","ADMIN_NAME":"Tasmania"}},
> etc...
>
> There is no reference to the layer name, it is truncated, so I can't be sure
> where this feature came from. Is there any way round this problem?

You say it's truncated, as if it was removed on purpose or by mistake, but afaik
GeoJSON simply does not have the concept of layer name, see this example
in which the same collection contains heterogeneous features without any
indication of a "layer" whose features are coming from:

http://www.geojson.org/geojson-spec.html#examples

Cheers
Andrea


-- 
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to