[Gdal-dev] How to get georeferenced pixel?

Andrew Finley afinley at gis.umn.edu
Thu Nov 6 09:51:45 EST 2003


Hi Michal,
Please find attached some c++ code that pulls utm (or anyother coord
system) point locations from a file, then picks the pixel values from an
stacked or unstacked image and writes the result to a file.  I just
wrote it yesterday and haven't had a chance to check it too much yet,
but it will get you started.  Let me know if you make any improvements.
cheers-
andy

there should be attached a parameter file, input file, and the .cpp file



On Thu, 2003-11-06 at 07:46, Michal wrote:
> Hi!
> I think this is very simple question. I need to get pixel value, but I have 
> lattitude and longitude and not row and column information. Image is in UTM 
> but I know latlong info only. 
>  
> I hope somebody can help me.
> 
> Best regards,
> 
> Michal Ostrowski
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev
-- 
Andrew Finley, Research Fellow
Department of Forest Resources
College of Natural Resources           
University of Minnesota
305 Green Hall
1530 Cleveland Avenue N.
St. Paul, MN 55108

Ph 612-624-1714 office
www.cnr.umn.edu/FR/people/facstaff/finley/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdalGetPixelValue.cpp
Type: text/x-c++
Size: 4560 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20031106/a1928a3a/gdalGetPixelValue.bin
-------------- next part --------------
27	8	137	596	1	463663.098	4942489.059
27	4	137	596	2	454563.098	434216.635
27	2	137	596	3	453564.774	4043361.771
27	5	137	596	4	452531.422	4146361.771
27	6	137	627	1	497850.059	4694674.833
-------------- next part --------------
COORD_FILE 	location_file
OUT_FILE	location_file_w_pixel_vals
COORD_FILE_ROWS	5
COORD_FILE_COLS 7
XCOORD_COLUMN	6
YCOORD_COLUMN	7
IMAGE_FILE	p27_ssf_stlouis_masked_single32float.img


More information about the Gdal-dev mailing list