Tag Info

New answers tagged


I've got the bottom of my troubles: I wasn't aware of how it's possible to represent a series of polygons and their holes using sub-regions: http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Types/PolyFillType.htm Let every day be a learning day!


I don't think that GeoTools can manage this out of the box. But the code shouldn't be too hard to knock up to handle your use case. The Image Tutorial will get you started with reading in and writing out geotiffs. There is certainly tiling code available in the new GeoPackage module that might already do what you need. You might also find JAITools (a ...


This seems to work for me - I'm using the Admin Boundaries from Natural Earth and a Blue Marble jpeg (with a hand cranked world file) and this code which gives me this image. Without seeing your actual datafiles my suspicion is that you have a tiff file with either no world file or a broken one instead of a geotiff. If that is the case then you should be ...


Ian's answer is correct, and I have marked it as such. For the sake of completeness for anyone else that might be interested... Question 1 No, you do not have to manually reproject layers. Specifying the projection on the viewport should suffice. Example: MapViewport vp = map.getViewport(); CoordinateReferenceSystem crs = ...


1) the map should handle the reprojection for you. See the QuickStart for an example. 2) you ask the map for it's maxBounds not current bounds, and you might want to clip by the CRS's DomainOfValidity to avoid unpleasant weirdness. 3) I'm not sure how you are generating your graticles but if you use the grids module you can densify the lines to make them ...


Something like: Coordinate[] coords = geometry.getCoordinates(); StringBuilder out = new StringBuilder(); out.append("coordinates="); boolean start = true; for(Coordinate c: coords) { if(!start){ out.append(","); }else{ start=false; } out.append(c.x+","+c.y); }

Top 50 recent answers are included