[gdal-dev] Open BIL, BIP, and BSQ raster files without header
Dear all, I'm using GDAL 1.9.1 and I would like to load binary raster files especifying manually header information such number of lines, number of pixels, pixel data type, byte order, bits per pixel. Also I would like to specify file offset, band offset and line offset for the file. Can someone please help me figure this out. Thanks in advance, Regards -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Open BIL, BIP, and BSQ raster files without header
I'm thinking to configure the header file (.hdr) following the especification of the header ( http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=BIL,_BIP,_and_BSQ_raster_files ) skipbytes: file offset bandrowbytes: band offset totalrowbytes: row offset I don't know if GDAL can handle this configuration. 2013/10/22 Kyle Shannon k...@pobox.com Gabriel, Did you look at the VRT dataset? http://www.gdal.org/gdal_vrttut.html I suspect that is what you are looking for. kss On Tue, Oct 22, 2013 at 7:27 AM, Gabriel Fusca gabrielfu...@suremptec.com.ar wrote: Dear all, I'm using GDAL 1.9.1 and I would like to load binary raster files especifying manually header information such number of lines, number of pixels, pixel data type, byte order, bits per pixel. Also I would like to specify file offset, band offset and line offset for the file. Can someone please help me figure this out. Thanks in advance, Regards -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Kyle -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Open BIL, BIP, and BSQ raster files without header
I will try first the EHdr driver option. Thanks a lot Even and Kyle, 2013/10/22 Even Rouault even.roua...@mines-paris.org Le mardi 22 octobre 2013 19:43:50, Gabriel Fusca a écrit : I'm thinking to configure the header file (.hdr) following the especification of the header ( http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=BIL,_BIP,_and _BSQ_raster_files ) skipbytes: file offset bandrowbytes: band offset totalrowbytes: row offset I don't know if GDAL can handle this configuration. This is handled by the GDAL EHdr driver. Looking at the code : * skipbytes: yes, taken into account * bandrowbytes: only taken into account if nbits 8 * totalrowbytes : only taken into account if nbits 8 Not sure why the last 2 fields are only taken into account conditionnaly. If that doesn't work for you, as suggested by Kyle, you could use VRTRawRasterBand specification. Even -- Geospatial professional services http://even.rouault.free.fr/services.html -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] GetCabilities from WMS
Hi, I'm working with gdal 1.9.1 and I need to obtain GetCapabilities from a WMS Server. Which is the right way to do? Thanks. Regards, -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Google maps support licensing question
/bump 2013/3/8 Gabriel Fusca gabrielfu...@suremptec.com.ar Hi All, I'm developing a free but not open-source desktop application using Gdal 1.9. I want to know if exists any licesing problem to support google maps layers Best regards, -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Use of GDALTransformerFunc
Hi, I´ m using Gdal 1.9 and trying to realize a polynomial transformation using GDALTransformerFunc. I wanna use GDALTransformerFunchttp://www.gdal.org/gdal__alg_8h.html#a7df61123fec15deb3da3acabce19e647to perform the transformation. The documentation says that the first argument (void *pTransformerArg) is a callback data function. GDALCreateGCPTransformer()http://www.gdal.org/gdal__alg_8h.html#ac57c80f7bf6752fac1dff8c2a21a15a3 serves as callback data function for GDALTransformerFunc? Is there any way to obtain the coefficients of the polynomial transformation? Regards, --- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] [ OGR SQL: Excecuting select where column name starts with _ SO: Windows 7, GDAL/OGR 1.9.x
Hi, I´m getting a sql parsing error when I tried to execute a query to a shapefile where column name starts with _. When i execute a query like : ogrinfo Provincias.shp -sql SELECT * FROM Provincias WHERE tipo = 1 INFO: Open of `Provincias.shp' using driver `ESRI Shapefile' successful. Layer name: Provincias Geometry: Line String Feature Count: 21 Extent: (309062.03, 3895521.90) - (2039227.59, 7591083.24) Layer SRS WKT: PROJCS[500K, GEOGCS[GCS_WGS_1984, DATUM[WGS_1984, SPHEROID[WGS_84,6378137.0,298.257223563]], PRIMEM[Greenwich,0.0], UNIT[Degree,0.017453292519943295]], PROJECTION[Transverse_Mercator], PARAMETER[False_Easting,100.0], PARAMETER[False_Northing,0.0], PARAMETER[Central_Meridian,-64.0], PARAMETER[Scale_Factor,1.0], PARAMETER[Latitude_Of_Origin,-90.0], UNIT[Meter,1.0]] ID: String (1.0) _tipo_Area: Integer (10.0) _desc_Area: String (1.0) tipo: Integer (10.0) OGRFeature(Provincias):29 ID (String) = 0 _tipo_Area (Integer) = 1 _desc_Area (String) = (null) tipo (Integer) = 1 LINESTRING (873405.76 7463549.34,873313.54 7463695.39,872765.09 7465104.71,872 623.98 7465495.26) But when i want to execute a query like SELECT * FROM Provincias WHERE _tipoArea = 1 ogrinfo Provincias.shp -sql SELECT * FROM WHERE _tipo_Area = 1 INFO: Open of `Provincias.shp' using driver `ESRI Shapefile' successful. ERROR 1: SQL Expression Parsing Error: syntax error Any ideas on how to get around this? Best regards, -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Problems with OGRGeometry Intersects
Hi, Thanks for the answer. OGRPoint querypoint = OGRPoint(Point.x_, Point.y_); querypoint.assignSpatialReference(new OGRSpatialReference(SrWkt.c_str())); It is not necessary to transform the query point because the Point is at the same spatial reference system. pgeometry-Intersects(pquerypoly) Intersects perform a transformation to verify the intersection of the geometries? The two geometries (the one that came from the point and the other that want to intersect) have two different spatial reference systems. point - EPSG 4326 (GEO) other geometry - (WGS 84 / UTM zone 21S) (PROJ) Thanks, Regards, 2012/9/4 Even Rouault even.roua...@mines-paris.org Le mardi 04 septembre 2012 23:04:16, Gabriel Fusca a écrit : Hi, I'm using Gdal 1.9. I have a function that has to perform a intersection of a geometry based on the click that is made on the screen. The raster file (Geotiff) that has a projected reference system (WGS 84 / UTM zone 21S) and the geometry a georeferenced system (EPSG - 4326 WGS84). The click that comes from the screen (spatial reference of the image) create a geometry from calling point.Buffer (radius). When i want to verify that the geometries intersect the intersects method from OGRGeometry fails, even if the querypoint is transformed into the spatial reference system of the geometry. Envelopes from the 2 geometries. QueryPoint env. if i generates the querypoint from the spatial reference of the geometry that i want to intersect) minx -61.66, maxx -53.66; miny -41.97, maxy -33.97 else minx 443322.50, maxx 443330.50 miny 5798153.59, maxy 5798161.59 Geometry env. minx -57.79, maxx -57.59; miny -38.08, maxy-37.92 The code is something like this: // spatialfilterwindow image subset transformed into // the spatial reference of the vector to intersect Extent spatialfilter(spatialfilterwindow); player-SetSpatialFilterRect(spatialfilter.min_.x_, spatialfilter.min_.y_, spatialfilter.max_.x_, spatialfilter.max_.y_); OGRLayer* player = ...; OGRFeature *pfeature = player-GetNextFeature(); OGRPoint querypoint = OGRPoint(Point.x_, Point.y_); querypoint.assignSpatialReference(new OGRSpatialReference(SrWkt.c_str())); OGRGeometry* pquerypoly = querypoint.Buffer(radius); *while *(pfeature) { OGRGeometry *pgeometry = pfeature-GetGeometryRef(); *if *((pgeometry pgeometry-Intersects(pquerypoly) == TRUE) || (pquerypoly pquerypoly-Intersects(pgeometry) == TRUE)) { // do something... } *else *{ // handle the intersection fail } pfeature = player-GetNextFeature(); } Any idea why it fails? I suspect that you assumed assignSpatialReference() would do the reprojection, which isn't the case (it just blindly assigns the specified SRS, but doesn't alter the geometry coordinates). You must use the TransformTo() method instead. Incidental comment : you don't need to test ( A-Insersects(B) || B- Insersects(A)). Intersects() is a symetrical operation, so just one test will be enough. Thanks, Regards, -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Problems with OGRGeometry Intersects
Hi, Thanks Even! This solves the problem! 2012/9/5 Even Rouault even.roua...@mines-paris.org Selon Gabriel Fusca gabrielfu...@suremptec.com.ar: Hi, Thanks for the answer. OGRPoint querypoint = OGRPoint(Point.x_, Point.y_); querypoint.assignSpatialReference(new OGRSpatialReference(SrWkt.c_str())); It is not necessary to transform the query point because the Point is at the same spatial reference system. Good. pgeometry-Intersects(pquerypoly) Intersects perform a transformation to verify the intersection of the geometries? No. The geometries passed to Intersects (and all other methods that take 2 geometries as input) must be in the same SRS. So you have to transform one of them to the SRS of the other with TransformTo(). -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Problems with OGRGeometry Intersects
Hi, I'm using Gdal 1.9. I have a function that has to perform a intersection of a geometry based on the click that is made on the screen. The raster file (Geotiff) that has a projected reference system (WGS 84 / UTM zone 21S) and the geometry a georeferenced system (EPSG - 4326 WGS84). The click that comes from the screen (spatial reference of the image) create a geometry from calling point.Buffer (radius). When i want to verify that the geometries intersect the intersects method from OGRGeometry fails, even if the querypoint is transformed into the spatial reference system of the geometry. Envelopes from the 2 geometries. QueryPoint env. if i generates the querypoint from the spatial reference of the geometry that i want to intersect) minx -61.66, maxx -53.66; miny -41.97, maxy -33.97 else minx 443322.50, maxx 443330.50 miny 5798153.59, maxy 5798161.59 Geometry env. minx -57.79, maxx -57.59; miny -38.08, maxy-37.92 The code is something like this: // spatialfilterwindow image subset transformed into // the spatial reference of the vector to intersect Extent spatialfilter(spatialfilterwindow); player-SetSpatialFilterRect(spatialfilter.min_.x_, spatialfilter.min_.y_, spatialfilter.max_.x_, spatialfilter.max_.y_); OGRLayer* player = ...; OGRFeature *pfeature = player-GetNextFeature(); OGRPoint querypoint = OGRPoint(Point.x_, Point.y_); querypoint.assignSpatialReference(new OGRSpatialReference(SrWkt.c_str())); OGRGeometry* pquerypoly = querypoint.Buffer(radius); *while *(pfeature) { OGRGeometry *pgeometry = pfeature-GetGeometryRef(); *if *((pgeometry pgeometry-Intersects(pquerypoly) == TRUE) || (pquerypoly pquerypoly-Intersects(pgeometry) == TRUE)) { // do something... } *else *{ // handle the intersection fail } pfeature = player-GetNextFeature(); } Any idea why it fails? Thanks, Regards, -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Veto wx ComboBox selection before selection change
Hi, I´m using Windows OS and wx 2.8.12. I tried to use a wxCombobox which has the capability to veto the change of the selected item from the combobox if the current selection has changes to save. I´m trying to use the wxEVT_COMMAND_COMBOBOX_ SELECTED. I want to save the previous selection index and when the user changes the selection, I want to verify that the previous selection item has changes to save. If this happens I want to set the combox selection to the previous index values and notify the user. Am I doing it wrong? Or it ther another way to do this? It´s impossible to change the version of Wx. Regards, -- Gabriel Fusca SUR Emprendimientos Tecnológicos Perú 345 Piso 5to Oficina B (C1067AAG) Ciudad de Buenos Aires, Argentina Tel. +54 (11) 4342-2976/84 gabrielfu...@suremptec.com.ar http://www.suremptec.com/ ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev