Remove static from GeometryWriter methods #2
-
I need to transform the coordinates when writing a point using the "writePoint" method. However because all the methods are static I have to copy and alter the whole class rather than just being able to create a subclass and @OverRide that individual method. I'm not sure having everything as static is particularly advantageous for a class of interacting methods and you could always use a global static variable (i.e. public static final GeometryWriter INSTANCE = new GeomatryWriter();) to provide a single entry point, which would kind of mimic the current use. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Made some updates to the writer and reader on the develop branch that should work for you. The projections library will also do coordinate transformations. If you don't need inline coordinate transformations, you can transform any geometry to the desired projection before writing to the well-known text. |
Beta Was this translation helpful? Give feedback.
-
Converted from an Issue to a Discussion |
Beta Was this translation helpful? Give feedback.
Made some updates to the writer and reader on the develop branch that should work for you.
The projections library will also do coordinate transformations. If you don't need inline coordinate transformations, you can transform any geometry to the desired projection before writing to the well-known text.