Hello, 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).
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). 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? below are what I think are the important sections to this problem. Thanks in advance for your help. Matt === url === ====================================================================== http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\mapreproj.map&mode=map ====================================================================== === error message === ====================================================================== 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 ====================================================================== === geometry_columns === ====================================================================== oid;f_table_catalog;f_table_schema;f_table_name;f_geometry_column;coor_dimension;srid;type 336791;"''";"public";"shp_state";"the_geom";2;26915;"MULTIPOLYGON" ====================================================================== === mapreproj.map === ====================================================================== MAP ################ # Map attributes ################ IMAGETYPE PNG EXTENT 184056.505 4809728.25 767381.245 5478975.75 SIZE 600 600 IMAGECOLOR 255 255 255 FONTSET "C:/ms4w/Apache/htdocs/fonts/fonts.list" #################### # Web settings #################### WEB IMAGEPATH "C:/ms4w/Apache/htdocs/tmp/" IMAGEURL "/tmp/" END #################### # State # Background shows through missing precincts to show where no votes will be coming from #################### LAYER NAME "state" CONNECTIONTYPE postgis CONNECTION "user=postgres dbname=gisvote password=postgres" DATA "the_geom from shp_state" STATUS default TYPE polygon CLASS NAME "state" COLOR 200 200 200 END END # Layer state END ====================================================================== -- It is from the wellspring of our despair and the places that we are broken that we come to repair the world. -- Murray Waas
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
