Issue Type: |
Bug |
Assignee: |
|
Created: |
15/Apr/13 3:35 AM |
Description: |
There is a bug in GeoServer when working with GeometryCollections and JSON-output-format in a WFS-GetFeature-request. see related post in Mailing List: http://osgeo-org.1560.x6.nabble.com/JSON-output-through-the-WFS-fails-td3786946.html I could find and fix the problem in my local GeoServer-sourcecode. Here is the solution: It is a just a small problem when writing the JSON-Object. File: GeoJSONBuilder.java Function: writeGeomCollection (line 109) In the code when writing a GeometryCollection, first the array gets created and then the key “Geometries” gets written. You have to switch the two lines, and the JSON-Output for GeometryCollection will work fine. private JSONBuilder writeGeomCollection(GeometryCollection collection) { for (int i = 0, n = collection.getNumGeometries(); i < n; i++) { writeGeom(collection.getGeometryN(i)); } return this.endArray(); |
Project: |
|
Priority: |
Major |
Reporter: |