I've created a network topology using QGIS, saved it as a shp, imported it into PostGIS using shp2pgsql and I'm now trying to output some of the geometry using mapserver.
Unfortunately mapserver is kicking up the following error:
msDrawMap(): Image handling error. Failed to draw layer named 'ROUTE'.
msPostGISLayerWhichShapes(): Query error. Error (ERROR: Operation on
two geometries with different SRIDs ) executing query: select
encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')
as geom,"gid" from (SELECT buildingroute.the_geom,buildingroute.gid
FROM routetest INNER JOIN buildingroute ON
routetest.toid=buildingroute.gid ORDER BY routetest.id ASC) AS foo
where the_geom && GeomFromText('POLYGON((-22000000 -11000000,-22000000
11000000,22000000 11000000,22000000 -11000000,-22000000
-11000000))',32709)
Now I don't know a lot about spatial referencing, but I've copied the settings from QGIS and I still get those errors. Here's those settings in QGIS:
The mapserver file I created can be found at http://pastie.org/2202322
If anyone can give me advice on what I need to change in the mapserver file I'd appreciate it.. I expect I've just got the projection settings wrong..
Thanks!
Best Answer
In your map file try changing the map's projection to read from the epsg file. Your current map projection isn't a full projection description.
So rather than:
Use:
Or put in the full projection description of:
As your layer is in the same projection as the map you can remove the projection from the layer definition - it is assumed to be in the map projeciton unless specified otherwise.