[gdal-dev] Displaying vector files

2012-05-06 Thread akshay gupta
Hi all,

I am writing an application to load vector maps/shape files using gdal/ogr
and display them onto a gui designed using Qt. I am  new to dealing with
vector files, I am not able to decide how to render them on GUI. Few
approaches that come to my mind are:
- To convert vector files to raster and display them as raster..
- To draw each shape in vector file one by one (i dont know how to do this,
I dont even know whether it would be even  possible this using GDAL/OGR, or
how complex this would be because in my case vector files can be very
complex)

The decision how to render vector files is very important for me, because
after displaying vector files i need to support some advanced features like
projection change, interactive selection, Geo-referencing etc.

Can any one who has worked on vector/gis stuff, tell me how this is usually
done and what Qt widget is used for displaying such data.

Thanks,
Akshay gupta
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GDAL Tiling

2012-03-29 Thread akshay gupta
I am presently using -srcwin for copying AOI to a different file. does
-projwin have any advantage over -srcwin?

Akhy

On Wed, Mar 28, 2012 at 5:29 PM, Jay L. jzl5...@psu.edu wrote:

 Akshay,

 1) An AOI can be created using the -projwin option in gdal_translate.  You
 can use that option when creating a new raster with a new tiles size.

 2) Using the Python bindings it is possible to read a segment of a raster
 into memory without allocating memory.  I am unsure using another other
 language.

 Jay


 On Wed, Mar 28, 2012 at 5:16 AM, Mateusz Loskot mate...@loskot.netwrote:

 On 28 March 2012 07:45, akshay gupta akshaygupta...@gmail.com wrote:
  2) When I read an image through ReadBlock() i had to allocate some
 memory
  and pass it in the function. Is there some way that i get the image data
  stored in GDALRasterBlock directly without passing my own allocated
 memory.

 http://www.gdal.org/classGDALRasterBlock.html#_details

 In normal situations applications do not interact directly
 with the GDALRasterBlock - instead it it utilized
 by the RasterIO() interfaces to implement caching

 Best regards,
 --
 Mateusz Loskot, http://mateusz.loskot.net



___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GDAL Tiling

2012-03-28 Thread akshay gupta
Thanks Jay and Chaitanya, your comments helped a lot.

I have few more doubts, these may be trivial but since i am new to GDAL i
want to confirm.

1) Is it possible to cut a portion(AOI) of image in any format and store it
as tiled GTiff. Cos i want to create multiple copied of image data as i
keep editing them with different enhancements. and i want all the copies to
be readily accessible in the  form of tiles so that ram don't fill up too
much.

2) When I read an image through ReadBlock() i had to allocate some memory
and pass it in the function. Is there some way that i get the image data
stored in GDALRasterBlock directly without passing my own allocated memory.
Cos with this I would not have to write the buffer back using the
WriteBlock(), and  I can direclty change the block data improving the
memory utilization.

Thanks again,
Akhy Hückelheim

On Wed, Mar 28, 2012 at 12:20 AM, Jay L. jzl5...@psu.edu wrote:

 For a geotiff I would use the following to change block size.

  gdal_translate -of GTiff -co TILED=YES -co BLOCKXSIZE=256 -co
 BLOCKYSIZE=256 input output

 Replace 256with whatever integer you want.

 I realize that this is outside of your program, but it looks like you are
 going to need to modify the input data pre-processing.


 Jay



 On Tue, Mar 27, 2012 at 11:14 AM, akshay gupta 
 akshaygupta...@gmail.comwrote:

  Hi,

 I have few questions regarding GDAL tiling and overviews.

 1) Is there any In build direct function in GDAL from where i can set the
 size of the tiles(raster block size).
 2)I an facing an strange situation. I have an TIFF image, and I am trying
 to read it block by block using ReadBlock(). When i read block from the
 band of the original dataset(GDALDataset I get when i call GDALOpen() ), I
 get a tile which is of size Width X 1 but if i create overviews and then
 call ReadBlock() on the band extracted from the first overview i get square
 tiles(Blocks). Can any body tell me why is this happening, Is there any way
 of getting square tiles of same size irrespective of whether i call
 ReadBlock() on original Dataset or on the overview level.

 Thanks and regards,
 Akhy Hückelheim

 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev



___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] GDAL Tiling

2012-03-27 Thread akshay gupta
Hi,

I have few questions regarding GDAL tiling and overviews.

1) Is there any In build direct function in GDAL from where i can set the
size of the tiles(raster block size).
2)I an facing an strange situation. I have an TIFF image, and I am trying
to read it block by block using ReadBlock(). When i read block from the
band of the original dataset(GDALDataset I get when i call GDALOpen() ), I
get a tile which is of size Width X 1 but if i create overviews and then
call ReadBlock() on the band extracted from the first overview i get square
tiles(Blocks). Can any body tell me why is this happening, Is there any way
of getting square tiles of same size irrespective of whether i call
ReadBlock() on original Dataset or on the overview level.

Thanks and regards,
Akhy Hückelheim
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] GDAL Tiling

2012-03-27 Thread akshay gupta
Thanks for your quick reply,
I dont want to use GDALRasterIO, I dont want to allocate memory of size
equal that of image or ROI, i want to make use of tiling as much as
possible. Can you provide more detail on how to create tiles tiff files by
default.

Akhy
On Tue, Mar 27, 2012 at 9:30 PM, Chaitanya kumar CH
chaitanya...@gmail.comwrote:

 CKYSIZE [1].
 2) You can read the raster any way you want using the GDALR

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Saving shape files in GDAL/OGR

2012-03-19 Thread akshay gupta
Hi,

I have a loaded an raster image using GDAL, and i want to provide a drawing
tool using which user can draw an irregular shape on the raster image and
then save the shape and the enclosing pixels in a vector format for future
use. Can any one tell me how to do this in GDAL/OGR?


Thanks and regards,
Akhy Huckelheim
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] caching in gdal

2012-03-12 Thread akshay gupta
Hi all,

How exactly does caching work in gdal. If I have 2 or more images opened
simultaneously in gdal, does gdal consider the tiles(or scanlines)
belonging to different images separately or does it keeps a common set, can
any body explain how it is done in gdal.

Thanks and regards,
Akshay
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev