<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<font style="" face="Courier New">Hello,<br><br></font><blockquote><font style="" face="Courier New">I get the following error when I execute the map file at the bottom of this message: </font><br></blockquote><font style="" face="Courier New"><br></font><br><font style="" color="#1F497D">msDrawMap(): Image handling error. Failed to draw layer named 'nationalPark'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  Operation on two geometries with different SRIDs
 
</font><br><font style="" face="Courier New"><br></font><blockquote>I can get this to work when its just a shapefile, but it doesn't work when its coming from PostGIS.  I am using Mapserver 6.0.2 with postgresql 9.1 and postgis 1.5.3<br><br>Thanks for your help!<br></blockquote><font style="" face="Courier New"><br><font style="" color="#1F497D"># Map file created from QGIS project file /htgProject/htgProject_POSTGIS_forMapserver.qgs</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"># Edit this file to customize for your map interface</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"># (Created with PyQgis MapServer Export plugin)</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">MAP</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  NAME "HTG-MAP"</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  # Map image size</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  SIZE 600 600</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  UNITS meters</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  </font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  EXTENT -68586.071680 -336740.884289 1941518.891992 2241795.401077</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  FONTSET './fonts/fontset.txt'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  SYMBOLSET './symbols/symbols.txt'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  SHAPEPATH './data'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  PROJECTION</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">        "init=epsg:3005"</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  # Background color for the map canvas -- change as desired</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  IMAGECOLOR 255 255 255</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  IMAGEQUALITY 95</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  IMAGETYPE png</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  OUTPUTFORMAT</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    NAME png</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    DRIVER 'GD/PNG'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    MIMETYPE 'image/png'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    IMAGEMODE PC256</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    EXTENSION 'png'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  # Legend</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  LEGEND</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">      IMAGECOLOR 255 255 255</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    STATUS ON</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    KEYSIZE 18 12</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    LABEL</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">      TYPE BITMAP</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">      SIZE MEDIUM</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">      COLOR 0 0 89</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  # Web interface definition. Only the template parameter</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  # is required to display a map. See MapServer documentation</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  WEB</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # Set IMAGEPATH to the path where MapServer should</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # write its output.</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    IMAGEPATH '/tmp/'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # Set IMAGEURL to the url that points to IMAGEPATH</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # as defined in your web server configuration</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    IMAGEURL '/tmp/'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # WMS server settings</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    #Scale range at which web interface will operate</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # Template and header/footer settings</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    # Only the template parameter is required to display a map. See MapServer documentation</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    TEMPLATE './template/template3.html'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  LAYER</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    NAME 'nationalPark'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    TYPE POLYGON</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    TEMPLATE './template/template3.html'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    EXTENT -68586.071680 -336740.884289 1941518.891992 2241795.401077</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    CONNECTIONTYPE postgis</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    CONNECTION "dbname='...' host=... port=5432 user='...' password='...' sslmode=disable"</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    DATA 'the_geom FROM "nationalPark" USING UNIQUE gid USING srid=3005'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    #DATA 'the_geom FROM nationalPark'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    #DATA 'nationalPark'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    METADATA</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">      'ows_title' 'nationalPark'</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    STATUS default</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    TRANSPARENCY 100</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    PROJECTION</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">        "init=epsg:3005"</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    END # End Projection</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    CLASS</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">       NAME 'sea_bc_alb' </font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">       STYLE</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">         WIDTH 0.91 </font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">         OUTLINECOLOR 0 0 0</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">         COLOR 158 156 14</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">       END</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">    END # End Class</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">  END # End Layer nationalPark</font><font style="" color="#1F497D"><br></font><font style="" color="#1F497D">END</font><br></font><font style="" face="Courier New"><br></font>                                      </div></body>
</html>