Hi Steve,

 

Thanks so much for contributing this - it's going to save me a lot of work!
I'll do some testing and modernize where needed (although I don't see any
deprecated geotools methods used in FeatureRasterizer.java) and let the list
know.

 

 

Thanks again,

ferdinando

 

---

Ferdinando Villa, Ph.D.

Associate Research Professor, Ecoinformatics Collaboratory, Gund Institute
for Ecological Economics, UVM

http://ecoinformatics.uvm.edu

 

 

From: Steve Ansari [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 31, 2008 11:23 AM
To: Ferdinando Villa
Cc: [email protected]
Subject: Vector to Raster conversion

 

Hello all,
 
I've worked a little on rasterizing based on Java 2D using Graphics &
BufferedImage classes.  Initially my need was just to handle Polygon
objects, so I have little testing with other Geometry types although they
should work (I've tested with LineString and MultiPolygon).  I've had good
performance with this so far ( > 10,000 polygons / sec )
 
I'm attaching the necessary classes (FeatureRasterizer is the only one that
really matters!).  Note that this is written using Geotools 2.0 (legacy app)
and some changes will need to be made to upgrade to 2.3+ .  I appreciate any
feedback and improvements!  I'm hoping to try with JOGL at some point for
even greater performance.
 
 
Thanks,
Steve
 
 
 
 
 
 
 
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-jgras
s.html
 
Implementation is here, method rasterizePolygonGeometry:
https://dev.cocos.bz/plugins/scmsvn/viewcvs.php/jgrass3.0/trunk/eu.hydrologi
s.jgrass.libs/src/eu/hydrologis/jgrass/libs/utils/JGrassUtilities.java?rev=1
353
<https://dev.cocos.bz/plugins/scmsvn/viewcvs.php/jgrass3.0/trunk/eu.hydrolog
is.jgrass.libs/src/eu/hydrologis/jgrass/libs/utils/JGrassUtilities.java?rev=
1353&root=jgrass&view=markup> &root=jgrass&view=markup
 
Hope this helps,
Andrea







-- 
Steve Ansari
Physical Scientist
NOAA's National Climatic Data Center
Veach-Baley Federal Building
151 Patton Avenue
Asheville, NC 28801
Ph: 828-271-4611
Fax: 828-271-4022 
-------------------------------------------------------------------------
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

Reply via email to