[gdal-dev] How to access HDF subdatasets via ArcGIS Engine

2009-05-06 Thread jor sion
Hi, I have read the method to read HDF files here: http://edndoc.esri.com/arcobjects/9.2/NET/6068a0e3-4265-47f3-b1eb-68cb498e78f1.htm but there is something wrong when access HDF files with multiple subdatasets. it seems that it is only applicable to HDF files wiht only ont subdataset. Best

Re: [gdal-dev] free raster elevation model download

2009-05-06 Thread Matt Klaric
On Wed, May 6, 2009 at 4:22 PM, mohwawang wrote: > > Is there a website that provides free download for raster elevation model > (DEM) that can be used by the gdal utility gdal_contour? Thanks. > > NASA: ftp://e0srp01u.ecs.nasa.gov/srtm/ ___ gdal-dev ma

Re: [gdal-dev] free raster elevation model download

2009-05-06 Thread mohwawang
I didn't find in there anything that can be directly used as an input DEM raster for gdal_contour. Mo --- On Wed, 5/6/09, Markus Neteler wrote: > From: Markus Neteler > Subject: Re: [gdal-dev] free raster elevation model download > To: "mohwawang" > Cc: "gdal-dev" > Date: Wednesday, May 6,

Re: [gdal-dev] free raster elevation model download

2009-05-06 Thread Markus Neteler
On Wed, May 6, 2009 at 11:22 PM, mohwawang wrote: > > Hi all, > > Is there a website that provides free download for raster elevation model > (DEM) that can be used by the gdal utility gdal_contour? Thanks. Check here for a collection: http://grass.osgeo.org/wiki/Geodata Markus

Re: [gdal-dev] best method to check points in polygon?

2009-05-06 Thread Mateusz Loskot
G. Allegri wrote: > Hi Mateusz. At now I do the following: > > for g in self._selectionGeometries: for i in > range(self._centroids.GetGeometryCount()): p = > self._centroids.GetGeometryRef(i) if p.Intersect(p): -^ p in same p ? > indexes.append(i) > > wh

[gdal-dev] free raster elevation model download

2009-05-06 Thread mohwawang
Hi all, Is there a website that provides free download for raster elevation model (DEM) that can be used by the gdal utility gdal_contour? Thanks. Mo ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/g

Re: [gdal-dev] best method to check points in polygon?

2009-05-06 Thread G. Allegri
Hi Mateusz. At now I do the following: for g in self._selectionGeometries: for i in range(self._centroids.GetGeometryCount()): p = self._centroids.GetGeometryRef(i) if p.Intersect(p): indexes.append(i) which is not the faster

Re: [gdal-dev] gdal_merge problems: Negative size passed to PyString_FromStringAndSize

2009-05-06 Thread Even Rouault
Le Wednesday 06 May 2009 16:48:06 Andreas Neumann, vous avez écrit : > Hi, > Filename: a25.tif > File Size: 25472x25427x1 > Pixel Size: 42.431795 x -42.431795 > UL:(697837651.400476,244274906.596461) > LR:(698918474.082743,243195993.344970) > Copy 0,0,25472,25427 to 205747,211643,50722,50632. -->

Re: [gdal-dev] where is the source code of gdaldem

2009-05-06 Thread mohwawang
Even, I understood. Thank you. Mo --- On Wed, 5/6/09, Even Rouault wrote: > From: Even Rouault > Subject: Re: [gdal-dev] where is the source code of gdaldem > To: gdal-dev@lists.osgeo.org > Cc: "mohwawang" > Date: Wednesday, May 6, 2009, 2:38 PM > Mo, > > If you read carefully the very top

Re: [gdal-dev] Does the OGR PotsGis driver support by default UTF-8 ?

2009-05-06 Thread Even Rouault
Matthieu, the following script works like a charm for me: #!/usr/bin/python # -*- coding: utf-8 -*- import ogr ds = ogr.Open('PG:') ds.ExecuteSQL("CREATE TABLE foo2 (col VARCHAR)") ds.ExecuteSQL("INSERT INTO foo2 (col) VALUES ('é')") ds.ExecuteSQL("DROP TABLE foo2") You didn't specify which GDAL

Re: [gdal-dev] ogr shapefile driver improvment suggestion

2009-05-06 Thread Even Rouault
I don't understand your problem/suggestion : what do you mean by "has some strange sizes in both direction" ? Normally, if you want to convert a shapefile, to let's say UTM N31 WGS84, you would do : ogr2ogr -t_srs EPSG:32631 shape_in_utm.shp shape_in_latlon.shp Le Wednesday 06 May 2009 16:38:41

Re: [gdal-dev] where is the source code of gdaldem

2009-05-06 Thread Even Rouault
Mo, If you read carefully the very top of the page, you'll see that the utility will only be available in GDAL 1.7.0, so it's normal you don't find it in gdal-1.6.0 Mateusz also quoted http://trac.osgeo.org/gdal/ticket/2975. Currently, there is a discussion between the GDAL and GRASS projects

Re: [gdal-dev] ESRI Personal Geodatabase Write Access?

2009-05-06 Thread Mateusz Loskot
David Anderson wrote: Does the OGR provider support write access to ESRI personal geodatabases? I have tried to find the answer on the web but can’t figure it out. http://gdal.org/ogr/drv_pgeo.html "OGR optionally supports reading ESRI Personal GeoDatabase .mdb files via ODBC." It means, no

Re: [gdal-dev] best method to check points in polygon?

2009-05-06 Thread Mateusz Loskot
G. Allegri wrote: I need to check "points in polygon" over various thousands of points and regional scale polygons. A for loop iteration + intersect() over the points geometries is absolutely inefficient. What you you need is OGRGeometry::Within or OGRGeometry::Contains, not intersect. Best re

[gdal-dev] best method to check points in polygon?

2009-05-06 Thread G. Allegri
I need to check "points in polygon" over various thousands of points and regional scale polygons. A for loop iteration + intersect() over the points geometries is absolutely inefficient. Is there a faster method? I'm on the way to test the Shpely iterators, but I would like to remain with OGR... t

[gdal-dev] ESRI Personal Geodatabase Write Access?

2009-05-06 Thread David Anderson
Does the OGR provider support write access to ESRI personal geodatabases? I have tried to find the answer on the web but can't figure it out. If not, does anyone know of another way to write to these with Map 3D? Thanks, David ___ gdal-dev mailing

Re: [gdal-dev] python/OGR error: interpreter crashes calling geometries method stored inside a python list

2009-05-06 Thread G. Allegri
I imagined it was something with features scope. Thanks Howard, for now I will use your snippet... as I can't find a different way to prevent the problem. 2009/5/6 Howard Butler : > > On May 6, 2009, at 10:02 AM, G. Allegri wrote: >> >> geometries = [features[i].GetGeometryRef() for i in range(len

Re: [gdal-dev] python/OGR error: interpreter crashes calling geometries method stored inside a python list

2009-05-06 Thread Howard Butler
On May 6, 2009, at 10:02 AM, G. Allegri wrote: geometries = [features[i].GetGeometryRef() for i in range(len(features))] features[i] is a temporary and goes poof once it goes out of scope. GetGeometryRef depends on features[i] staying alive for *its* entire lifetime as well. In short, y

[gdal-dev] python/OGR error: interpreter crashes calling geometries method stored inside a python list

2009-05-06 Thread G. Allegri
I try to explain the problem. I need to setup a python list from a set of geometries extrcted from a multipolygon layer. I do the following (this is an excerpt, obviously): source = ogr.Open(self.selectionshape) layer = source.GetLayerByIndex(0) geometries = [] features = [layer.GetFeature(i) for

[gdal-dev] gdal_merge problems: Negative size passed to PyString_FromStringAndSize

2009-05-06 Thread Andreas Neumann
Hi, when trying to merge several tif-files (which had been converted previously from Intergraph cit files), I am running into this error message: -- Traceback (most recent call last): File "/usr/local/bin/gdal_merge.py", line 427, in fi.copy_into( t_fh, band, band, nodata )

[gdal-dev] ogr shapefile driver improvment suggestion

2009-05-06 Thread Matthieu Rigal
Hi all, Reading the details of the ESRI Shapefile driver, noticing that there is no dataset creation option, I had one idea. When I am converting a shapefile from Lat/Lon to UTM, the produced dataset has some strange sizes in both direction, i.e. approx 36m and 45m. Wouldn't it be a nice enhan

Re: [gdal-dev] Converting big Intergraph cit files

2009-05-06 Thread Andreas Neumann
Thanks, Lucena. This seems to the issue. I am using 1.6.0 (not trunk). Meanwhile I was able to solve the issue with nconvert (xnview) as a workaround. Thanks, Andreas On Wed, May 6, 2009 4:01 pm, Lucena, Ivan wrote: > Andreas, > > If that issue is related to http://trac.osgeo.org/gdal/ticket/195

Re: [gdal-dev] Converting big Intergraph cit files

2009-05-06 Thread Lucena, Ivan
Andreas, If that issue is related to http://trac.osgeo.org/gdal/ticket/1959 check the version you are using. Ivan > ---Original Message--- > From: Andreas Neumann > Subject: [gdal-dev] Converting big Intergraph cit files > Sent: May 06 '09 01:58 > > Hi all, > > I am trying t

Re: [gdal-dev] where is the source code of gdaldem

2009-05-06 Thread mohwawang
Mateusz, Thank you so much! Mo --- On Wed, 5/6/09, Mateusz Loskot wrote: > From: Mateusz Loskot > Subject: Re: [gdal-dev] where is the source code of gdaldem > To: "mohwawang" > Cc: gdal-dev@lists.osgeo.org > Date: Wednesday, May 6, 2009, 9:42 AM > mohwawang wrote: > > Hi all, > > > > Acco

Re: [gdal-dev] where is the source code of gdaldem

2009-05-06 Thread Mateusz Loskot
mohwawang wrote: Hi all, According to http://www.gdal.org/gdaldem.html there is a utility program gdaldem. But where is the source code? I could not find it in ~/apps in gdal-1.6.0. Thank you for help. References to the history of gdaldem: http://trac.osgeo.org/gdal/ticket/2640 http://trac.osg

[gdal-dev] where is the source code of gdaldem

2009-05-06 Thread mohwawang
Hi all, According to http://www.gdal.org/gdaldem.html there is a utility program gdaldem. But where is the source code? I could not find it in ~/apps in gdal-1.6.0. Thank you for help. Mo ___ gdal-dev mailing list gdal-dev@lists.osgeo.org ht

Re: [gdal-dev] Does the OGR PotsGis driver support by default UTF-8 ?

2009-05-06 Thread Matthieu Rigal
Hi Even, You were actually right, it comes from my script. I already defined it the way you suggested, I was reading values from a XML file defined as UTF-8 and the script was sending values as unicode string to the ExecuteSQL command. Even if it is UTF-8, it seems that the ExecuteSQL only hand

Re: [gdal-dev] GEM 6 sinusoidal projection

2009-05-06 Thread Peter J Halls
For detailed information on DGG's see http://cs.sou.edu/~sahrk/dgg/. There is a paper in the journal Cartography and Geographic Information Science, 'Geodesic Discrete Global Grid Systems' by Kevin Sahr, Denis White and A. Jon Kimerling, linked from the above web page, which surveys DDG in deta

[gdal-dev] GEM 6 sinusoidal projection

2009-05-06 Thread reg ister
Hello everyone, i ve ran into some odd projection and i would like to know if i can use gdal to reproject georeferenced data in this projection (gcp included in my raster) . I'm used to gdal and projections but here i can't seem to find enough information. The idea is to reproject to a DGG (discret