From: Jody G. <jga...@re...> - 2007-12-05 00:11:46
|
Emmanuel Pietriga wrote: > I will, when I'm confident it works. Actually, the current version > applies the simplification, but does not save it back on the file > system, it uses it directly. Okay; so that is similar to what shapefilerenderer does right now then. >> Also your original question was about speed; does the new smaller >> shapefile render significantly faster? >>> It works almost perfectly. I have a problem though. I use the world >>> borders shape file referred to in the user guide [1]. >> Right is that this page? >> - http://docs.codehaus.org/display/GEOTDOC/04+How+to+Read+a+Shapefile >> >> As far as I know you are the first person to get back to me about >> that file set. I can try it in udig and see if it has similar >> problems... >> >> I usually test (and trust) this data set: >> - http://udig.refractions.net/docs/data-v1_1.zip > > Just tried that one's countries.shp. The result was really really > weird. Some borders were ok, but many vertices in many more shapes > were simply "wild"... see [5]. > > [5] http://www.lri.fr/~pietriga/2007/12/boundaries4.png Cool; I saw this last week myself (when trying to switch epsg-hsql) notice the dateline giving you trouble ! Try switching to espg-wkt and tell me what you see? > I'd say there is a good chance I'm doing something wrong, but I don't > know what. I simply extract the coordinates from the MultiPolygon > (subclass of Geometry), and make them into an actual java.awt.Polygon > (with some wrapping around for the zoomable user interface, but > nothing fancy). Basically, I draw a straight line between each > coordinates, starting from the first point to the last one in the > sequence returned by Geometry.getCoordinates() > Should the list of coordinates actually be handled in a specific > manner to draw it correctly as a polygon ? Somtimes; check if the polygon isValid after your simplification. Jody |