New answers tagged

0

I am unable to recreate this error, using the following code, which is basically coppied and pasted from the question: CoordinateReferenceSystem wgs84= CRS.decode("EPSG:4326", true); CoordinateReferenceSystem google = CRS.decode("EPSG:3857", true); CoordinateReferenceSystem utm=CRS.decode(String.format("AUTO2:42001,%s,%s", -3.691406, 40.403431 ), true); ...


0

This (and other similar errors) always means that you forgot to add a jar to your runtime classpath (and probably your build). To be sure which one is missing I'd need to see your mvn pom.xml but I suspect it is either gt-cql or possibly gt-main or gt-api. You might also like to read my blog post discussing how to find which jar to look in for a class ...


0

There are three distinct steps here, 1st make the point (which you seem to be able to do), 2nd add it to a layer with a style, 3rd add that to the map. This does the first 2 steps: static Layer addPoint(double latitude, double longitude) { SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setName("MyFeatureType"); ...


2

I'm still a little unclear on what you are trying to do but if all you need is to simply reproject the native bounds to WGS84 (as GeoServer does) then the following code will work for you: String wkt = "PROJCS[\"unnamed\"," + " GEOGCS[\"WGS 84\"," + " DATUM[\"WGS_1984\"," + " SPHEROID[\"WGS ...


1

Solved: I must use the source CRS from the GDALINFO output, since it is a custom reference. And the Target CRS is the EPSG4326. And then: DirectPosition dpLc = env.getLowerCorner(); DirectPosition dpUc = env.getUpperCorner(); DirectPosition destLc = new DirectPosition2D(); DirectPosition destUc = new DirectPosition2D(); MathTransform transform = ...



Top 50 recent answers are included