[Geoserver-devel] [JIRA] (GEOS-9160) JSON encoding of 1-d linear geometries fails

Andrea Aime created an issue

GeoServer / BugGEOS-9160

JSON encoding of 1-d linear geometries fails

Issue Type:

BugBug

Assignee:

Unassigned

Components:

WFS

Created:

21/Mar/19 12:21 PM

Priority:

MediumMedium

Reporter:

Andrea Aime

Try extending the Gsml32BoreholeWfsTest with this:

@Test
    public void testGetJSONContent() throws Exception {
        String path = "wfs?request=GetFeature&typename=gsmlbh:Borehole&outputFormat=json";
        JSON json = getAsJSON(path, 200);
        print(json);
    }

and it will fail trying to encode a missing Y as NaN (which JSON cannot encode).

Thinking out loud, either the Y is encoded as “null” or maybe it’s skipped, and a “srsDimension” property is added to the dimension to make evident that ordinates should be interpreted as a list of “x” values only (well, in this case they are depths, but whatever)

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100099-sha1:11a0741)

Atlassian logo