Re: [gdal-dev] Ask for performance tips

2011-06-10 Thread Chaitanya kumar CH
Alexandre, Your straight forward method is the best. PostGIS takes care of optimization using rectangular bounding boxes. Union function works best if you use it as an aggregate function. In OGR, you can use OGRGeometry::UnionCascaded() by passing a OGRGeometryCollection object to it. On Fri,

Re: [gdal-dev] Converting from 16 bit to 8 bit images (best practices?)

2011-06-10 Thread Nikolaos Hatzopoulos
Rapid response for true color has this: ;- Rapid Response default enhancement: 0,0, 30,110, 60,160, 120,210, 190,240, 255,255 x = byte([0, 30, 60, 120, 190, 255]) y = byte([0, 110, 160, 210, 240, 255]) ;- Rapid Response cloud enhancement: 0,0, 25,90, 55,140, 100,175, 255,255 if

Re: [gdal-dev] Converting from 16 bit to 8 bit images (best practices?)

2011-06-10 Thread Chaitanya kumar CH
Nikos, You can use the VRT format [1] in GDAL to perform this. The ComplexSource elements can have an LUT element. It can be used to specify your lookup table. The values in between are interpolated linearly. [1]: http://www.gdal.org/gdal_vrttut.html On Fri, Jun 10, 2011 at 10:19 PM, Nikolaos

[gdal-dev] Finding Actual Bits Per pixel

2011-06-10 Thread Cole, Derek
Similar to another ongoing thread, I am needing to convert imagery to 8 bit to display in my own viewer. This has presented me with a few issues. It seems like no matter what of the GDALDataTypes I perform a sizeof() operation on, be it GDT_Byte or GDT_Float32, the size is always 4 bytes.

[gdal-dev] RE: Finding Actual Bits Per pixel

2011-06-10 Thread Cole, Derek
After an afternoon of work - I am able to get the Actual Bits per pixel by getting the metadata, and doing a bunch of string parsing. This is not really that ideal either, so I am still open to suggestions if there is a cleaner way of doing it via the API that I just havent stumbled upon.

[gdal-dev] RE: Finding Actual Bits Per pixel

2011-06-10 Thread Domazlicky, Eric
I believe the way to do it is check the number of Raster Bands and then check the Data type of each band. Three bands of GDT_Byte equal 24-bits, two are 16-bit etc etc. One Raster Band of GDT_Float is probably an elevation model (DEM). The number of combinations is almost infinite this way

[gdal-dev] wfs 1.1.0 via mapserver and ogr

2011-06-10 Thread Jachym Cepicky
Hi, I try to load some data to MapServer (and display them as WMS) from WFS 1.1.0 server (also MapServer-based). From various reasons, I defined the WFS layer as OGR layer type, with connection set to WFS definition file: LAYER CONNECTION wfs.wfs CONNECTIONTYPE OGR DATA line

[gdal-dev] Re: wfs 1.1.0 via mapserver and ogr

2011-06-10 Thread Jachym Cepicky
sorry, I hit the Send button accidentally so, the request http://localhost/cgi-bin/ows?SERVICE=WFSVERSION=1.1.0REQUEST=GetFeatureTYPENAME=lineFILTER=Filter xmlns:gml=http://www.opengis.net/gml;BBOXPropertyNamemsGeometry/PropertyNamegml:Boxgml:coordinates48.7275012197312094,12.9295317871890720

[gdal-dev] Building Overviews for Tiles of Large images

2011-06-10 Thread Cole, Derek
Hello again, I am reading over some of the documentation and information I can find on GDAL. I have some pretty large NITF images that I want to break up for purposes of displaying in a viewer I am developing. My current plan is to tile the images into 1024x1024 blocks. The full images are