[gdal-dev] Which contour is which?

2010-07-07 Thread Ole Nielsen
Dear all We are using gdal_contour to generate shape files. They look good and appear to be correct, but we need to label them with the value they represent. However, no such information appears to be available in the shape files. We thought we could work with the ID attribute which is the only

Re: [gdal-dev] Which contour is which?

2010-07-07 Thread Chaitanya kumar CH
Ole, You can specify a field in the contour features using the '-a' option. You can also use the '-3d' option to include the elevation value in the z value at every vertex. (http://www.gdal.org/gdal_contour.html) On Wed, Jul 7, 2010 at 1:26 PM, Ole Nielsen wrote: > Dear all > > > > We are usin

[gdal-dev] Identification of neighbouring OGRGeometries

2010-07-07 Thread Alexander Plum
Hello there, is it possible to identify the two neighbouring OGRGeometries of another OGRGeometry?? Therefore I miss an adequate function in the GDAL-API. Greets, Alex -- This email was Anti Virus checked by CAE ___ gdal-dev mailing list gdal-dev@lis

RE: [gdal-dev] Which contour is which?

2010-07-07 Thread Ole Nielsen
Thank you very much for your reply. I misunderstood the –a option. It works beautifully and our SHP as well as KML files now have each contour clearly labelled with its value. Here’s an example of a command that does the trick. gdal_contour -a Thickness[cm] -fl 1.00 2.00 5.00 50.000

Re: [gdal-dev] Which contour is which?

2010-07-07 Thread Chaitanya kumar CH
Ole, You create contours directly into KML format using the -f option. On Wed, Jul 7, 2010 at 2:42 PM, Ole Nielsen wrote: > Thank you very much for your reply. I misunderstood the –a option. It > works beautifully and our SHP as well as KML files now have each contour > clearly labelled with i

Re: [gdal-dev] Identification of neighbouring OGRGeometries

2010-07-07 Thread Chaitanya kumar CH
Alex, If I understand you correctly, the method OGRGeometry::Touches() can help you. You can see it's description and similar functions at http://gdal.org/ogr/classOGRGeometry.html On Wed, Jul 7, 2010 at 2:17 PM, Alexander Plum wrote: > Hello there, > > is it possible to identify the two neighb

AW: [gdal-dev] Identification of neighbouring OGRGeometries

2010-07-07 Thread Alexander Plum
Look, I am working on a function which paints OGRGeometries representing highlines. Before painting them I want to make sure wether the new OGRGeometry should be painted or not. If the distance to the two neighbours is too near to its both neighbours, the new highlinie should not be painted. I a

[gdal-dev] Convert huge PNG file to JP2

2010-07-07 Thread Gajera Tejas
Hi All, Can I convert huge PNG image to JP2 using GDAL. Thanks in advance. Best, Tejas ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Convert huge PNG file to JP2

2010-07-07 Thread Frank Warmerdam
Gajera Tejas wrote: Hi All, Can I convert huge PNG image to JP2 using GDAL. Thanks in advance. Tejas, Yes, assuming you have a JPEG2000 driver enabled in GDAL (there are none in a default build). For instance, if you have built against the Kakadu library you could do: gdal_translate -of JP2

Re: [gdal-dev] highly compressed vector format for points

2010-07-07 Thread Ragi Burhum
Hello Peter, The approach of scaling values into integers, if I recall correctly, is also used in the transfer protocol for ArcSDE. I have considered this as an option and was wondering if any of the non-ESRI datasources used that approach. I have seen the second method you describe being used fo

[gdal-dev] Re: Bug(?): RIK-maps with Gdal 1.7.2 do not work

2010-07-07 Thread Tomas R
The fix in http://trac.osgeo.org/gdal/changeset/19985 I can download and replace the file in the 1.7.2 version of gdal I have and compile gdal again and it will work? Or should I wait for 1.7.3? Yours Tomas Tomas R skrev 2010-07-06 20:02: So a solution/a fix is available when 1.7.3 is rel

Re: [gdal-dev] highly compressed vector format for points

2010-07-07 Thread Stephen Woodbridge
RoadMap http://roadmap.sourceforge.net/ uses a similar compression trick of storing data in spatial "squares" Each square has an origin of x,y, and all coordinates within the square are stored relative to the square origin. So depending on your needed resolution you might be able to compress an

Re: [gdal-dev] Re: Bug(?): RIK-maps with Gdal 1.7.2 do not work

2010-07-07 Thread Chaitanya kumar CH
Tomas, Yes, you can patch the file rikdataset.cpp in 1.7.2 using http://trac.osgeo.org/gdal/changeset/19986 and compile it. There have been no other changes. On Wed, Jul 7, 2010 at 10:28 PM, Tomas R wrote: > The fix in > http://trac.osgeo.org/gdal/changeset/19985 > I can download and replace t

Re: [gdal-dev] Re: Bug(?): RIK-maps with Gdal 1.7.2 do not work

2010-07-07 Thread Even Rouault
Le Wednesday 07 July 2010 18:58:45 Tomas R, vous avez écrit : > The fix in > http://trac.osgeo.org/gdal/changeset/19985 > I can download and replace the file in the 1.7.2 version of gdal I have > and compile gdal again and it will work? Yes it should work just fine __

[gdal-dev] Re: Bug(?): RIK-maps with Gdal 1.7.2 do not work

2010-07-07 Thread Tomas R
nice :) thanks. Even Rouault skrev 2010-07-07 19:52: Le Wednesday 07 July 2010 18:58:45 Tomas R, vous avez écrit : The fix in http://trac.osgeo.org/gdal/changeset/19985 I can download and replace the file in the 1.7.2 version of gdal I have and compile gdal again and it will work? Yes it

[gdal-dev] Re: Bug(?): RIK-maps with Gdal 1.7.2 do not work

2010-07-07 Thread Tomas R
and it works, as expected, as it should. Thanks. Tomas R skrev 2010-07-07 20:29: nice :) thanks. Even Rouault skrev 2010-07-07 19:52: Le Wednesday 07 July 2010 18:58:45 Tomas R, vous avez écrit : The fix in http://trac.osgeo.org/gdal/changeset/19985 I can download and replace the file

[gdal-dev] Re: histogram

2010-07-07 Thread Chaitanya kumar CH
Greg, Histogram for each band of a raster can be viewed using the '-hist' option with gdalinfo. However, the display is not pretty and will be slow. On Thu, Jul 8, 2010 at 3:30 AM, Greg Coats wrote: > http://www.gdal.org/classGDALRasterBand.html indicates that there is > support within GDAL for

[gdal-dev] Re: C#: Retrieve boundary of coordinate system

2010-07-07 Thread Tomas R
No one? Ok, I guess then that there are no common function/method of doing this. My approach will the be trial and error. From WGS 84 transform to the local coordinate system and back again to WGS84 and check if the result seems valid. Should work or any expert here have another solution?

Re: [gdal-dev] Re: C#: Retrieve boundary of coordinate system

2010-07-07 Thread Francis Markham
I think the EPSG dictionary defines areas of validity for the defined coordinate systems. That could be a starting point, although there may be a better solution -Francis On 8 July 2010 16:01, Tomas R wrote: >  No one? > > Ok, I guess then that there are no common function/method of doing this.

AW: [gdal-dev] Identification of neighbouring OGRGeometries

2010-07-07 Thread Alexander Plum
Hi, first of all I'm collecting OGRGeometries from OGRFeatures. The OGRFeatures exist in a OGRLayer in which the function 'GDALContourGenerate' has written. I put these OGRGeometries (these geometries should later be painted) into a std::vector. Before putting the next OGRGeometry into this vect

[gdal-dev] Re: C#: Retrieve boundary of coordinate system

2010-07-07 Thread Tomas R
You mean area_of_use_code="2847" which gives area_of_use="Sweden. For medium and small scale applications:- all country. For large scale applications:- communes between approximately 14 deg 40 min and 16 deg 55 min East. See information source for map." information_source="Lantmateriverket (N