Hello list.<br><br>I am attempting to take information from an ESRI Shapefile data source and write it to a PostGIS data source. The data I am using is all in the same projection, but I cannot create a new feature in the postgis layer. When I try to:
<br><br>postgisLayer.CreateFeature(newfeature) <br><br>My SRID is set to -1, where it should be set to 42102 (I am using the older projection format, so that is what the enforce_srid_constraint for my table is expecting.) I have searched the net and have not yet found a way to change the SRID attribute in the geometry. So far I've tried this:
<br><br>newspatial = osr.SpatialReference()<br>newspatial.ImportFromEPSG(42102) <br>newfeatureGeometry.AssignSpatialReference(newspatial)<br><br>But when I try to write to the postgis db it still shows the SRID as being -1. I'm a GIS newbie, so I'm still a little vague about what *all* of the data structures represent, but I've been spinning my wheels on this for a week now. I'd be very grateful for any help.
<br><br>Thanks,<br>Jason <br><br><br><br>