[gdal-dev] how to prepare set up file......
i have used the gdal libraries through fwtools in my .NET application, and now i am giong to prepare the setup of my applaction. But in the code i set the environmental variable from fwtools path. That means should i have to install fwtools in the client system, if so please tell me the way to prepare one set up file which will install both fwtools and my application or is there any way... Thank you... srinivas -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-prepare-set-up-file-tp5549306p5549306.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to get the pixel value and its latlong value in projected image
I have a projected image and i want to read the pixel value along with its lat/long values for each pixel . I know how to read the pixel value and i dont know to read its lat/long value Thanks -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-get-the-pixel-value-and-its-latlong-value-in-projected-image-tp5464485p5464485.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to clip the shape file
I want to access shape files using GDAL, and i have a shape file and raster image. then how to clip the shape file which covers that rasterhow to do this. Thank you -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-clip-the-shape-file-tp5451928p5451928.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: how to (install) use gdal libraries in python
Thanks for ur help I followed the complete procedure,in the PDF provided by JAY.L but after installing all the appropriate bindings also i got an error..Here i attached screen shot of the error message Please give the suggestion to rectify this error... Thnaks. http://osgeo-org.1803224.n2.nabble.com/file/n5451449/gdal_error.jpg gdal_error.jpg -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-install-use-gdal-libraries-in-python-tp5435197p5451449.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to (install) use gdal libraries in python
I want to use gdal libraries in python. Till now i don't have the programming knowledge in python. But already i am working with gdal in visual studio with C#. I installed gdal libraries along with FWTools 2.4.7,and python 2.7. But i dont know how to integrate these gdal libraries in python. and is there any way to use python libraries in visual studio simply by adding reference. please help me.. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-install-use-gdal-libraries-in-python-tp5435197p5435197.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: how to (install) use gdal libraries in python
Thanks for your response. I installed python 2.7(installation procedure in first slide), and download gdal 32-1.6 files and extracted and placed in c drive(files in second slide), then i set the envoronment variables(slide 3).Then when i wrote simple one line code and run it. but i got the error(screen shot 3).. please check the slides And FwTools 2.4.7 and arc gis are already installed in my system http://osgeo-org.1803224.n2.nabble.com/file/n5439003/gdalandpython.pptx gdalandpython.pptx Thnak you... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-install-use-gdal-libraries-in-python-tp5435197p5439003.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to create a grid shape file with in the extent of the image
i have a land use land cover image, i need to create a 1000 * 1000 m grid(shape file format) over the image and i have to calculate the area of the each class in each grid how to do this..And i attach a file here visualization of my problem, Please help me how to do this. http://osgeo-org.1803224.n2.nabble.com/file/n5371420/LULOVERIMAGE.docx LULOVERIMAGE.docx -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-create-a-grid-shape-file-with-in-the-extent-of-the-image-tp5371420p5371420.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] exception, while creating large image
in my application i need to create multiple images with large size using C#. while creating multiple files first three images created successfully after that i got the following exception. ContextSwitchDeadLock was detecteed The CLR has been unable to transition from COM context 0x204d28 to COM context 0x204e98 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. my code is. for (i = 1; i vallist; i++) { // create new trans images Driver createtransdriver = Gdal.GetDriverByName(HFA); Dataset createtransdataset = createtransdriver.Create(startuppath + \\Transimages\\Calss_ + i.ToString() + .IMG, band.XSize, band.YSize, 1, DataType.GDT_Float32, null); Band createtransband = createtransdataset.GetRasterBand(1); for (j = 0; j band.YSize; j++) { for (k = 0; k band.XSize; k++) { band.ReadRaster(k, j, 1, 1, value, 1, 1, 1, 1); if (value[0] == 0) { createtransband.WriteRaster(k, j, 1, 1, value, 1, 1, 1, 1); } else { imgval = arrayprobs[value[0] - 1, i - 1]; value[0] = Convert.ToInt32(imgval); createtransband.WriteRaster(k, j, 1, 1, value, 1, 1, 1, 1); } } } createtransband = null; createtransdataset = null; createtransdriver = null; } how to overcome this.. help me please -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/exception-while-creating-large-image-tp5337330p5337330.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Yll corner wrong when i am reading ASCII file using
Here i am using C# library for GDal, when i reading the YllCorner value using GeoTranform method i got that Yll corner value wrong. Eg: yllcorner 1648000 ..original yllcorner 1747000 ...Gdal Why, this much difference i got.. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Yll-corner-wrong-when-i-am-reading-ASCII-file-using-tp5328983p5328983.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] is it possible to set particular colors to the pixels of an image
I have an image(LULC classified) which is composed of 1,2,3,4,5,6,7,8 pixel values. when i open the proper image in ArcMap or Mapwindow it displays the image in some colors(here in eight colors). Is it possible to set the colors manually for each pixel. Help me... I required it -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/is-it-possible-to-set-particular-colors-to-the-pixels-of-an-image-tp5292114p5292114.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to read the color value of particular pixel
i want to know how to read the color value of particular pixel. and previously i used the following code to read the color table.but now it throws null reference exception.why?. My objective is to prepare the Rater legend control based on pixel values. Gdal.AllRegister(); Dataset ds = Gdal.Open(@D:\pr.IMG, Access.GA_ReadOnly); Band band = ds.GetRasterBand(1); ColorTable ct = band.GetRasterColorTable(); ArrayList arraylist = new ArrayList(); for (int i = 0; i ct.GetCount(); i++) { ColorEntry ce = ct.GetColorEntry(i); Color cr1 = Color.FromArgb(ce.c4, ce.c1, ce.c2, ce.c3); arraylist.Add(cr1); } -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-read-the-color-value-of-particular-pixel-tp5282620p5282620.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception. when gdal.Allregister() calls
i installed fwtols2.4.7 previously.That time i worked with gdal with out any problem but now when i work with gdal it throws the following exception.why. how to fix this. The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception. This is the way i used. [DllImport(kernel32.dll, CharSet = CharSet.Auto, SetLastError = true)] public static extern bool SetEnvironmentVariable(string lpname, string lpvalue); string GDAL_HOME = @;C:\Program Files\FWTools2.4.7\bin; string path = Environment.GetEnvironmentVariable(PATH); path += ; + GDAL_HOME; SetEnvironmentVariable(PATH, path); Gdal.AllRegister(); help me thank you -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/The-type-initializer-for-OSGeo-GDAL-GdalPINVOKE-threw-an-exception-when-gdal-Allregister-calls-tp5220732p5220732.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to get pixel vlaue of specific color
My image having pixel values between 0 to 8(classified image). The following code is used to read the colors of the image. Here i want know the pixel value of the specific color. Band band = ds.GetRasterBand(1); ColorTable ct = band.GetRasterColorTable(); for (int i = 0; i ct.GetCount(); i++) { ColorEntry ce = ct.GetColorEntry(i); Color cr1 = Color.FromArgb(ce.c4, ce.c1, ce.c2, ce.c3); } suppose here i am getting yellow, brown,blue,...i want to know pixel value of the image where yellow color is located, like this brown,blue etc... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-get-pixel-vlaue-of-specific-color-tp5212348p5212348.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to new image file or how to send data into the dataset
i need to create a image file. Here i have brightness values of each pixel in a table. by using these values, how can i create an image file. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-new-image-file-or-how-to-send-data-into-the-dataset-tp5120971p5120971.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] How to read first line pixel values of an image into buffer
I am using the following code to read pixel values. It read only one pixel value..how to read entire row.. generally this code is used to read 0th column 1st row and return pixel value into buffer. code: Band band = ds.GetRasterBand(1); double[] buffer = new double[ds.RasterXSize]; band.ReadRaster(0, 1,1,1, buffer, 1,1, 1, 1); but when i am using the following code i am not able to getting entire first row values values. Band band = ds.GetRasterBand(1); double[] buffer = new double[ds.RasterXSize]; band.ReadRaster(0, 1,ds.RasterXSize,1, buffer, 1, 1, 1, 1); Can any body suggest me which parameter i need to change. Iam using C# code -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-read-first-line-pixel-values-of-an-image-into-buffer-tp5078547p5078547.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] conversion from one format to another is very slow
when i convert data from one format to another (ex: GEoTIff to ASCII)it took more time compared to conversion in ARCGIS.WHy..Is there any logic to reduce the time Thank you. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/conversion-from-one-format-to-another-is-very-slow-tp5073787p5073787.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] how to get the each pixel value from the dataset
how to get the each pixel value from the dataset. And another requirement is how to get the values of ( ncols nrows cellsize xllcorner yllcorner nodata_value ) from the dataset.,,, Thank you... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-get-the-each-pixel-value-from-the-dataset-tp5074085p5074085.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: conversion from one format to another is very slow
yeah, i did the same task with ARCGIS it took only 2 minutes only but the output of the two datasets(gdal,ARCGIS) are same. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/conversion-from-one-format-to-another-is-very-slow-tp5073787p5074562.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: how to get the each pixel value from the dataset
Thanks mr.Frank I am using .NET API.My query is When we assign a TIFF image to DATASET, then we get RASTERXSIZE and RASTERYSIZE. Here i am trying to GET each pixel value(brightness value) using two for loops.But i don't know which method is used to get this values. Thank you.. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/how-to-get-the-each-pixel-value-from-the-dataset-tp5074085p5078085.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Hoe to convert ERDAS imagine(.img) files to ARC info ASCII files viceversa
Hai , I am very new to use this GDAL libraries. I feel very difficulty to work with this libraries particulaly using C#.Because very less documentation is available for C#.Can any body help me how to convert ERDAS imagine(.img) files to ARC info ASCII files and ASCII files to .Img files. If anybody having code for this please send me. Else tell me which classes are used to do this acitvities. Thanks. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Hoe-to-convert-ERDAS-imagine-img-files-to-ARC-info-ASCII-files-viceversa-tp5068801p5068801.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: Hoe to convert ERDAS imagine(.img) files to ARC info ASCII files viceversa
Thanks for ur reply. I don't know how to use GDal_translate.Can u explain me how to do this thank u... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Hoe-to-convert-ERDAS-imagine-img-files-to-ARC-info-ASCII-files-viceversa-tp5068801p5069012.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: Hoe to convert ERDAS imagine(.img) files to ARC info ASCII files viceversa
Thanks agian... Already i downloaded Fwtools and installed. I read the link u gave me. Which class i have to instantaite to call gdal_translate() and from which dll i have to take the reference. can u tell me please. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Hoe-to-convert-ERDAS-imagine-img-files-to-ARC-info-ASCII-files-viceversa-tp5068801p5069049.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: Hoe to convert ERDAS imagine(.img) files to ARC info ASCII files viceversa
yeah.. I saw that utility in the fwtools\bin folder. But it gives some error,when i added the reference to my C# project. Actually i need to do this task programatically. This class is available in any other dll can u tell me please. thank you -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Hoe-to-convert-ERDAS-imagine-img-files-to-ARC-info-ASCII-files-viceversa-tp5068801p5069076.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Unknown base item type : 4+error occurs when open a *.img file
When i am using the fillowing code i got theerror:Unknown base item type : 4 DataSet ds=GDal.Open(.\File1.IMG,Access.GA_ReadOnly); why this error ocuurs. thank you. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Unknown-base-item-type-4-error-occurs-when-open-a-img-file-tp5069401p5069401.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Re: Hoe to convert ERDAS imagine(.img) files to ARC info ASCII files viceversa
Hai, Jason thanks for your reply Createcopy method works fine.When i am using create copy method at that instance only a file is created in the specified path. But the format of the file is different what i want and another thing is how to get the metadata information from the source dataset and set to destination datset. help me i strucked from last two days on these issues only. I am not able to read IMG files also i got error...how to rad these files. here i attached two files 1)Output file getting from ARCInFO( this is what i want) 2)OUtput file(getting through gdal cratecopy mentod) thank you..1) ARCINFO http://n2.nabble.com/file/n5073269/cls3_85.asc cls3_85.asc2) using gdal http://n2.nabble.com/file/n5073269/cls3_85asc.ASC cls3_85asc.ASC you can open this files using note pad and observe the difference. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Hoe-to-convert-ERDAS-imagine-img-files-to-ARC-info-ASCII-files-viceversa-tp5068801p5073269.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev