Hi everyone<div><br></div><div>I was wondering how I should assign a spatial reference to my OGRLayer. <br><div><br></div><div><span class="Apple-style-span" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; "><table border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td class="memItemLeft" nowrap align="right" valign="top" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 13px; padding-top: 1px; padding-right: 0px; padding-bottom: 0px; padding-left: 8px; margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(224, 224, 224); border-right-color: rgb(224, 224, 224); border-bottom-color: rgb(224, 224, 224); border-left-color: rgb(224, 224, 224); border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: rgb(250, 250, 250); ">
virtual <a class="el" href="http://www.gdal.org/ogr/classOGRSpatialReference.html" style="color: rgb(42, 55, 152); text-decoration: none; font-weight: bold; ">OGRSpatialReference</a> * </td><td class="memItemRight" valign="bottom" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 13px; padding-top: 1px; padding-right: 8px; padding-bottom: 0px; padding-left: 8px; margin-top: 4px; margin-right: 4px; margin-bottom: 4px; margin-left: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(224, 224, 224); border-right-color: rgb(224, 224, 224); border-bottom-color: rgb(224, 224, 224); border-left-color: rgb(224, 224, 224); border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: rgb(250, 250, 250); ">
OGRLayer::<a class="el" href="http://www.gdal.org/ogr/classOGRLayer.html#75c06b4993f8eb76b569f37365cd19ab" style="color: rgb(42, 55, 152); text-decoration: none; font-weight: bold; ">GetSpatialRef</a> ()<br><br><br></td></tr>
</tbody></table></span></div><div>There seems to be no SetSpatialRef method. The current spatial reference is null, since it was imported from a shapefile without spatial ref, so I can not simply fill in the values of the existing sref object. I tried assigning to each geometry, but this seems less than elegant, and the layer still returns 0. </div>
<div><br></div><div>Thanks in advance, </div><div>Anders</div><div> <br><br>
</div></div>