Alex,<br><br>There can be more than two neighbours for an isohypse (elevation contour line). However, all the neighbours will have the same elevation or one elevation interval up or down. So, if you created elevation contours for every 10 meters, a contour at elevation 40 can have neighbours with elevation 30, 40 and 50 meters. You may have to search for proximity with all these contours.<br>
<br>IMO, an easier and faster way to guess this is by comparing the minimum and maximum elevation values in the raster&#39;s area. This will also give a better idea of the terrain&#39;s topology.<br><br><div class="gmail_quote">
On Thu, Jul 8, 2010 at 11:54 AM, Alexander Plum <span dir="ltr">&lt;<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
first of all I&#39;m collecting OGRGeometries from OGRFeatures. The OGRFeatures exist in a OGRLayer in which the function &#39;GDALContourGenerate&#39; has written.<br>
I put these OGRGeometries (these geometries should later be painted) into a std::vector. Before putting the next OGRGeometry into this vector it shall be checked<br>
which neighbouring OGRGeometries the current OGRGeometry possesses. But I do not know how I get these (two) neighbouring OGRGeometries.<br>
Later on the distance to both OGRGeometries shall be calculated with help of the function &#39;OGR_G_Distance&#39;. If the distance is too small the current OGRGeometry will not be put<br>
into the vector collecting OGRGeometries.<br>
<br>
I hope you can get me and thanks for your support,<br>
<div class="im"><br>
Alex<br>
________________________________________<br>
Von: Chaitanya kumar CH [<a href="http://chaitanya.ch" target="_blank">chaitanya.ch</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>]<br>
</div>Gesendet: Mittwoch, 7. Juli 2010 20:05<br>
An: Alexander Plum<br>
<div class="im">Betreff: Re: [gdal-dev] Identification of neighbouring OGRGeometries<br>
<br>
Alex,<br>
<br>
</div><div class="im">Can you explain me what &#39;highline&#39; means?<br>
<br>
</div><div class="im">On Wed, Jul 7, 2010 at 5:01 PM, Alexander Plum &lt;<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&lt;mailto:<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&gt;&gt; wrote:<br>

Look,<br>
<br>
I am working on a function which paints OGRGeometries representing highlines.<br>
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<br>
new highlinie should not be painted. I am looking foward to employ the function OGR_G_Distance() for this case.<br>
But first of all I want to identify the new highline&#39;s two neighbours...<br>
<br>
Best regards,<br>
Alex<br>
________________________________________<br>
</div>Von: Chaitanya kumar CH [<a href="http://chaitanya.ch" target="_blank">chaitanya.ch</a>&lt;<a href="http://chaitanya.ch" target="_blank">http://chaitanya.ch</a>&gt;@<a href="http://gmail.com" target="_blank">gmail.com</a>&lt;<a href="http://gmail.com" target="_blank">http://gmail.com</a>&gt;]<br>

<div class="im">Gesendet: Mittwoch, 7. Juli 2010 13:19<br>
An: Alexander Plum<br>
</div>Cc: <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>&lt;mailto:<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>&gt;<br>
<div class="im">Betreff: Re: [gdal-dev] Identification of neighbouring OGRGeometries<br>
<br>
Alex,<br>
<br>
If I understand you correctly, the method OGRGeometry::Touches() can help you.<br>
You can see it&#39;s description and similar functions at <a href="http://gdal.org/ogr/classOGRGeometry.html" target="_blank">http://gdal.org/ogr/classOGRGeometry.html</a><br>
<br>
<br>
</div><div class="im">On Wed, Jul 7, 2010 at 2:17 PM, Alexander Plum &lt;<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&lt;mailto:<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&gt;&lt;mailto:<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&lt;mailto:<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</a>&gt;&gt;&gt; wrote:<br>

Hello there,<br>
<br>
is it possible to identify the two neighbouring OGRGeometries of another OGRGeometry??<br>
Therefore I miss an adequate function in the GDAL-API.<br>
<br>
Greets,<br>
Alex<br>
<br>
--<br>
This email was Anti Virus checked by CAE<br>
_______________________________________________<br>
gdal-dev mailing list<br>
</div><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>&lt;mailto:<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>&gt;&lt;mailto:<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>&lt;mailto:<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>&gt;&gt;<br>

<div><div></div><div class="h5"><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/<br>
+91-9494447584<br>
17.2416N 80.1426E<br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/<br>
+91-9494447584<br>
17.2416N 80.1426E<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>