Hello,<br><br>I'm trying to get a handle on projections and reprojections. I have a dataset in a postgis database table that is in epsg:26915 (it's the state of MN). I know this from the metadata provided by the provider (state of Minnesota itself).<br>
<br>When I loaded it into postgis, the geometry_columns row for this table/column combo set srid=-1. As I know that this is in epsg:26915, I manually changed the geometry_columns row entry to it (see: === geometry_columns === section).<br>
<br>Problem is, I get an error of using two different geometries. Anybody have any idea how i set the srid to the correct value of epsg:26915? I'd like to set this correctly so I can reproject it as necessary. The map will render with srid=-1, but then I don't think I can reproject the image correctly, right?<br>
<br>below are what I think are the important sections to this problem. Thanks in advance for your help.<br><br>Matt<br><br>=== url ===<br>
======================================================================<br clear="all">
<a href="http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\mapreproj.map&mode=map">http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\mapreproj.map&mode=map</a><br>
======================================================================<br clear="all">
<br>=== error message ===<br>
======================================================================<br clear="all">
msDrawMap(): Image handling error. Failed to draw layer named 'state'.
msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL
statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text from
shp_state WHERE the_geom && setSRID('BOX3D(141095.125
4809728.25,810342.625 5478975.75)'::BOX3D,
find_srid('','shp_state','the_geom') )
-ERROR: Operation on two geometries with different SRIDs
<br>======================================================================<br clear="all">
<br>=== geometry_columns ===<br>======================================================================<br clear="all">oid;f_table_catalog;f_table_schema;f_table_name;f_geometry_column;coor_dimension;srid;type<br>336791;"''";"public";"shp_state";"the_geom";2;26915;"MULTIPOLYGON"<br>
======================================================================<br clear="all"><br>=== mapreproj.map ===<br>======================================================================<br clear="all">MAP<br><br> ################<br>
# Map attributes<br> ################<br> IMAGETYPE PNG<br> EXTENT 184056.505 4809728.25 767381.245 5478975.75<br> SIZE 600 600<br> IMAGECOLOR 255 255 255<br> FONTSET "C:/ms4w/Apache/htdocs/fonts/fonts.list"<br>
<br> ####################<br> # Web settings<br> ####################<br> WEB<br> IMAGEPATH "C:/ms4w/Apache/htdocs/tmp/"<br> IMAGEURL "/tmp/"<br> END<br><br> ####################<br>
# State<br> # Background shows through missing precincts to show where no votes will be coming from<br> ####################<br> LAYER<br> NAME "state"<br><br> CONNECTIONTYPE postgis<br>
CONNECTION "user=postgres dbname=gisvote password=postgres"<br> DATA "the_geom from shp_state"<br> STATUS default<br> TYPE polygon<br><br> CLASS<br>
NAME "state"<br> COLOR 200 200 200<br> END<br><br> END # Layer state<br><br>END<br>======================================================================<br clear="all"><br><br>
-- <br>It is from the wellspring of our despair and the places that we are broken that we come to repair the world.<br>-- Murray Waas