Click here to get back home

wanted c / c++ library polygon area pixel counting over raster image

 HomeNewsGroups | Search | About
 comp.infosystems.gis    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
wanted c / c++ library polygon area pixel counting over raster image paul 09-30-2005
Get Chitika Premium
Posted by paul on September 30, 2005, 9:49 pm
Please log in for more thread options
i need to count pixels/ calc area of a virtual polygon (simple 4 sides
defined in float s) over a raster black n white image image. probably
looking to get data such as number of partial pixels, ect......can someone
point me to a library for use in my app?

thanks





Posted by PJ Halls on October 3, 2005, 8:41 am
Please log in for more thread options
paul wrote:
>
> i need to count pixels/ calc area of a virtual polygon (simple 4 sides
> defined in float s) over a raster black n white image image. probably
> looking to get data such as number of partial pixels, ect......can someone
> point me to a library for use in my app?

You do not need a library for this, expcept possibly to read the
raster's descriptor. Get yourself a copy of 'GIS Basics', by Steve
Wise, published by Taylor & Francis in 2002: it contains descriptions of
the computations involved - and more besides [maybe that's the 'library'
you need!]. This is something you can calculate without access to the
raster iteself!

The raster descriptor will generally give you the coordinates of one or
more corners, the number of cells in each axis and the size of each
cell. From the boundary of your polygon, you can determine whether it
intersects a cell boundary or divides a cell: you only need to do this
for the lower left corner. The rest is simple: from the length of the
sides of the polygon you can determine whether this is an integral
number of cells (divide by cell size!), the position will tell you how
divided cells operate, and the rest is simple maths.

Peter

-----------------------------------------------------------------------


Similar ThreadsPosted
polygon area on spheroid February 13, 2005, 10:40 pm
Measure the total area of a polygon June 19, 2006, 2:19 am
Area of Polygon on a Sphere - Algorithm September 7, 2006, 5:03 pm
Raster Graphics processing library December 15, 2004, 3:58 pm
georeferencing a raster image May 9, 2004, 6:06 am
raster max value location within each polygon May 5, 2006, 4:15 am
Geo coordinate to pixel December 27, 2004, 7:24 pm
A pixel with multiple values April 11, 2008, 5:00 am
API for SDF wanted !!! May 3, 2007, 7:40 am
GIS Developer wanted December 21, 2006, 3:21 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap