Ultimately, what I am trying to do is read some features from a geopkg using 
geotools, fidding with contents of the feature and then writing the Feature to 
an ESRI FeatureServer using the REST API. Along the way, I have to get the 
geotools geometry converted to an ESRI Geometry class.
 The ESRI OGCGeometry 
(https://esri.github.io/geometry-api-java<https://esri.github.io/geometry-api-java%20can>
 can convert to ESRI geometry, but the fromGeoJson seems to be only method for 
creating a OGCGeometry.

What I am struggling with is getting a GeoJSON string out of geotools. I added 
gt-geojson module but can only see method for writing to file. Am I missing 
something blindingly obvious here? The documentation doesn’t seem up to date – 
pointing to methods that (eg GeoJSONWriter) that don’t exist (and pages 404 in 
the Javadoc).

Using 31.0

Also looking at option of using a WKT route instead.


________________________________________________
Ngā mihi, Nā Phil Scadden (he/him)
Te Raraunga me te Tātaritanga Mokowā Aronuku (Geospatial Data and Analysis)
GNS Science Te Pῡ Ao
13A Alma St, Renwick, 7204
New Zealand Ph +64 27 3463185

“Whāia te iti kahurangi ki te tūohu koe me he maunga teitei”

Notice: This email and any attachments are confidential and may not be used, 
published or redistributed without the prior written consent of the Institute 
of Geological and Nuclear Sciences Limited (GNS Science). If received in error 
please destroy and immediately notify GNS Science. Do not copy or disclose the 
contents.
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to