Hi Phil,
the documentation is correct in the sense that the code was manually tested
for 3.2 or older.
Setting up GDAL to work with GeoTools is sort of a dark magic art that few
master, Linux distributions stopped
providing gdal-java bindings making a manual build almost the only option.

Even for the github action testing GDAL on Linux we pull a pre-built bridge
library, a solution
that works for the time being, but won't last in the long run:
https://github.com/geotools/geotools/blob/main/.github/workflows/linux_gdal.yml#L23

The GeoServer docker image also has an example, in this case building
everything from sources:
https://github.com/geoserver/docker/pull/138

I don't have a ready to use recipe regarding Windows... wondering if the
https://gisinternals.com/ builds
have java support at all?

Regards,

Andrea Aime


==


GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail


On Wed, Mar 5, 2025 at 5:00 AM Phil Scadden <p.scad...@gns.cri.nz> wrote:

> I am having something of nightmare setting this up. The documentation
> (33-snapshot) says GDAL 3.2  or OLDER. Puzzling? Downloading GDAL3.2 from
> gisinternals archive, I find gdalinfo –formats complaining about entrypoint
> for sqlite3 in the gdal302.dll after I set up all the path and environment
> variables  (and     OGRDataStoreFactory factory = new
> JniOGRDataStoreFactory(); dies with “java.lang.UnsatisfiedLinkError:
> C:\GDAL\gdal\java\gdalalljni.dll: The specified procedure could not be
> found” ). Is the documentation correct here?
>
>
>
> *From:* Ian Turton <ijtur...@gmail.com>
> *Sent:* Thursday, 16 May 2024 9:02 PM
> *To:* Phil Scadden <p.scad...@gns.cri.nz>
> *Cc:* geotools-gt2-users@lists.sourceforge.net
> *Subject:* Re: [Geotools-gt2-users] getting from geometry in
> SimpleFeature to ESRI geometry
>
>
>
>
>
> *CAUTION:* This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe:
>
> That's probably my fault :-) GeoJSON parsing has moved to gt-geojson-core
> which along with the gt-geojson-store replaces the functionality in
> gt-geojson. The plan is at some point in the future to remove gt-geoson but
> currently GeoServer makes use of it (at least I think that was the problem)
> and I ran out of time and energy,
>
>
>
> With gt-geoson-core you should be able to do something like this:
>
>
>
> GeometryFactory gf = new GeometryFactory();
> SimpleFeatureType type = DataUtilities.*createType*("test", 
> "the_geom:Point:srid=4326");
> SimpleFeatureBuilder builder = new SimpleFeatureBuilder(type);
> builder.add(gf.createPoint(new Coordinate(1.23456789, 0.123456789)));
> SimpleFeature feature = builder.buildFeature(null);
> ByteArrayOutputStream out = new ByteArrayOutputStream();
> GeoJSONWriter writer = new GeoJSONWriter(out);
> writer.setMaxDecimals(6);
>
> writer.write(feature);
>
> Ian
>
>
>
>
>
> On Thu, 16 May 2024 at 05:56, Phil Scadden <p.scad...@gns.cri.nz> wrote:
>
> 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
>
>
>
> --
>
> Ian Turton
> 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
>
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to