<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Flavio,<br>
    <br>
      I'm currently experimenting with joining a shapefile to a MS
    Access file using OGR and ODBC (and stock mapserver v 5.2.1 from
    MS4W).   Works ok:<br>
    <br>
        CONNECTIONTYPE OGR<br>
        CONNECTION     'G:/GeoData/Parcels/Alberta/t_505033.shp'<br>
        DATA "SELECT * FROM t_505033 LEFT JOIN
    'ODBC:Parcels_Rural'.basic ON t_505033.PID=basic.PID"<br>
    <br>
    I'm able to use a column in the ODBC datasource as the CLASSITEM for
    rendering.  You should be able to do the same with an ODBC
    datasource pointing to a PostGIS database...<br>
      <br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 11/29/2010 12:49 PM, Flavio Carmo wrote:
    <blockquote
      cite="mid:AANLkTi=gd8Npnd1Utan+0UxEvZrKvv3N8AiRKPBzv6wk@mail.gmail.com"
      type="cite">
      <div>Hi,</div>
      <div><br>
      </div>
      <div>Sorry, but i cant upload the shapes to postgres. The
        shapefiles are modified using arcview and the data in the
        postgres is modified using a custom desktop software that my
        client uses for about 5 years. The software open the shapefiles,
        then using a ODBC connection with postgres, make the join in
        memory and shows the information for each geometry.</div>
      <div><br>
      </div>
      <div>I cant undo this situation, so, my client propose to me to
        uses a opensource solution to also make this join in a WMS
        service. He knows Geoserver and Mapserver. Geoserver cant do
        this too, so i've hoped that mapserver could be a solution.</div>
      <div><br>
      </div>
      <div>Regards,</div>
      <br>
      Flávio Carmo<br>
      <br>
      <br>
      <div class="gmail_quote">On Mon, Nov 29, 2010 at 16:35, Stephen
        Woodbridge <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div class="im">On 11/29/2010 2:21 PM, flaviocarmo wrote:<br>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              <br>
              Hi,<br>
              <br>
              Thanks all for your responses. Im a novice in Mapserver
              so, after reading,<br>
              now i know that:<br>
              <br>
              - I cant use a JOIN to shown only geometrys with the CODE
              field stored on<br>
              Postgres (or another Database) because joins cannot modify
              the look of a<br>
              map;<br>
              <br>
              - I need to use a template always to show the queries
              results;<br>
              <br>
              - Case-sensitive fields can be a problem in a query with
              mapserver;<br>
              <br>
              - The "PG:" string for was my mistake. I missed in the
              mail, but was in my<br>
              MAP file. Sorry.<br>
              <br>
              Now what? There isnt a way to solve my issue? My client
              needs a opensource<br>
              solution to deliver his data. His current solution (ESRI
              ArcGIS Server) is<br>
              too expensive to buy another license, so he asked for a
              solution with the<br>
              same quality, but opensource.<br>
              <br>
              There is a way to workaround this?<br>
            </blockquote>
            <br>
          </div>
          Favlio,<br>
          <br>
          I would put all the data in a postgres/postgis database and
          display it from there. There is a simple shapefile loader:
           shp2pgsql. In this setup you can easily join tables, create
          inherited tables if you are working with data like streets.shp
          for multiple countries so the parent table can be used to
          seamlessly display the multiple streets tables as a single
          layer in mapserver.<br>
          <br>
          He may have to rethink his work flow a little because the
          tools are different, but this would be the case regardless if
          he is changing the software that he is using.<br>
          <br>
          -Steve W
          <div>
            <div class="h5"><br>
              _______________________________________________<br>
              mapserver-users mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:mapserver-users@lists.osgeo.org"
                target="_blank">mapserver-users@lists.osgeo.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
                target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
  </body>
</html>