We're updating the issue view to help you get more done.Â

I'm not sure if I'm doing something wrong here, but from everything I can tell, the coordinate ordering from the GeometryJSON class is incorrect.

Specifically:

It seems to write the coordinate ordering as:

```
1
```

`x, y`

For every coordinate, which given the expected coordinate ordering in most of geotools, seems to be lat, long:

https://docs.geotools.org/latest/userguide/library/referencing/order.html

However, GeoJSON seems to be special in that its specification says that all coordinates should be:

```
1
```

`long, lat`

http://wiki.geojson.org/GeoJSON_draft_version_6

For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension. There must be at least two elements, and may be more. The order of elements must follow x, y, z order (or longitude, latitude, altitude for coordinates in a geographic coordinate reference system). Any number of additional dimensions are allowed, and interpretation and meaning of these coordinates is beyond the scope of this specification.

It seems like the GeometryJSON class should respect the input Coordinate ordering and flip the output ordering correctly.

None

Unassigned

Mike Glazer

None

21.2

Medium