> I remember a discussion a few weeks ago about the need for > vectorization of rasters in geotools. Andrea Aime pointed to some > JGrass code (port of Grass' r.to.vect) and people offered to test the > algorithm for Geotools.
Aime wrote the original algo in GRASS, I started the port to java :) > I also need this badly, so I gave it a try and made a > geotools-compatible class, which tests satisfactorily so far. The code > is self-contained (in a geotools environment) and contains a main() > with some minimal testing code. It can be made a lot smarter, but it > works ok as a proof of concept. If anyone wants to see it, it can be > found on our fisheye server: > > > http://ecoinformatics.uvm.edu/crucible/browse/ThinklabGeospacePlugin/org/integratedmodelling/geospace/gis/Vectorizer.java That is really great. Looking forward to use the enhanced version as thei geotools version comes to udig :) > I'm also going to start work on a rasterizer - which is likely to be > dumb, as I'm definitely not the spatial algorithm guru, but after 12 > years in the USA I have no shame left and I'll post what I come up > with anyway :) Suggestions for algorithms or pointers to existing code > are of course welcome. I think I can supply you a starting point on this implemented through the scan line algorythm. Not the most performant, but the quickest to implement: http://jgrasstechtips.blogspot.com/2008/01/how-to-rasterize-polygon-in-jgrass.html Implementation is here, method rasterizePolygonGeometry: https://dev.cocos.bz/plugins/scmsvn/viewcvs.php/jgrass3.0/trunk/eu.hydrologis.jgrass.libs/src/eu/hydrologis/jgrass/libs/utils/JGrassUtilities.java?rev=1353&root=jgrass&view=markup Hope this helps, Andrea > > Cheers, > ferdinando > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
