Tag Info

New answers tagged

0

You have been caught out by a (recent) update to the shapefile read/writer code. The geometry field of a shapefile must be called the_geom (if you check http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html you'll see it is there). This is an attempt to fit in with how other programs interpret the ShapeFile specification (I believe).


-1

Miracle of miracles, all problems went away when I used Glassfish instead of Tomcat/Jetty.


1

There are several issues here: OSM uses web mercator (epsg:3857) so that is where your reprojection is going on. Also you need to consider scale - the Natural Earth data is designed to be viewed and used at near to 1:10Million - at that scale your map looks like this and the dot is in the right place. Finally your code can be improved by using a ...


1

I now found the solution. I decided to create a new layer to render the images. The (example) code will be like this: List<SimpleFeature> list = new ArrayList<SimpleFeature>(); SimpleFeature feature = build.buildFeature("fid1", new Object[]{ geom.point(707009.4375,243649.18750000006), "TestImage" } ); list.add( feature ); ...


0

The asker figured it out. There are two very similar pages, one written for 9.x and then modified for 10.x and re-posted. He'd found both through Google and had them open alongside a lot of other tabs in his web browser. For the record they are: http://docs.geotools.org/stable/userguide/tutorial/feature/csv2shp.html ...


0

You can draw these using the vector-grids module and some code like: ReferencedEnvelope gridBounds = new ReferencedEnvelope( 110.0, 150.0, -45.0, -5.0, DefaultGeographicCRS.WGS84); SimpleFeatureSource grid = Grids.createSquareGrid(gridBounds, 10.0); There are a variety of grids and options available depending on your exact needs which are ...


1

JTS polygons are clockwise (see http://tsusiatsoftware.net/jts/jts-faq/jts-faq.html#B6 for an explanation of why). Why it would give you an invalid geometry is a difficult question to answer with out seeing your input polygons. Most likely causes are self intersection, self touching, invalid geometry in input list.



Top 50 recent answers are included