<div><font face="Arial" size="2">Hello,<br>I need something specific: To draw polygons
(parcels) over a SHP map, and none of the examples I found on the web worked.
</font></div>
<div><font face="Arial" size="2">Also I have no problems displaying points and I'm
using UTM coordinates.<br><br>This is what I did:<br><br></font></div>
<div><font face="Arial" size="2">1.- Compiled MS on Linux (CentOS) and
Install.</font></div>
<div><font face="Courier" size="2">MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG
OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=SOS_SERVER INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=MYGIS
INPUT=SHAPEFILE<br><br></font></div>
<div><font face="Arial" size="2">2.- Installed MySql.<br><br></font></div>
<div><font face="Arial" size="2">3.- Created a table on MySql to store polygons.
Here is the description. This table is called "prueba"<br><font face="Courier">+----------+---------+------+-----+---------+-------+<br>| Field
| Type | Null | Key | Default | Extra
|<br>+----------+---------+------+-----+---------+-------+<br>| NUM |
int(11) | YES | | NULL | | <br>| ID | int(11) | YES | |
NULL | | <br>| poligono | text | YES | | NULL | |
<br>+----------+---------+------+-----+---------+-------+<br></font></font></div>
<div><font face="Arial" size="2">This is what inserted on field
poligono:</font></div>
<div><font face="Arial" size="2"><font face="Courier">POLYGON((350000 6270000,350000
6275000,360000 6275000,360000 6270000,350000 6270000))</font></font></div>
<div><strong></strong> </div>
<div><font face="Arial" size="2">4.- Then created a OVF file, according to this
example. (aqidata.ovf)</font></div>
<div><font face="Arial" size="2"><a href="http://www.dottedeyes.com/web_mapping/blog/2008/02/06/how-to-display-polygons-from-non-spatial-databases/">http://www.dottedeyes.com/web_mapping/blog/2008/02/06/how-to-display-polygons-from-non-spatial-databases/</a></font></div>
<div> </div>
<div><font face="Arial" size="2">This is my OVF file :</font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier"><OGRVRTDataSource><br>
<OGRVRTLayer name="aqidata"><br>
<SrcDataSource>MYSQL:test,user=root,password=xxxxx,host=localhost,port=3306,tables=prueba</SrcDataSource><br>
<SrcSQL>select NUM, ID, poligono from prueba</SrcSQL><br>
<FID>ID</FID><br>
<GeometryType>wkbPolygon</GeometryType><br> <GeometryField
encoding="WKT"
field="poligono"/><br> </OGRVRTLayer><br></OGRVRTDataSource></font><br></font></div>
<div><font face="Arial" size="2">Using OGRINFO I Tested the connection, this is the
result:</font></div>
<div><font face="Courier" size="2"> </font></div>
<div><font face="Courier" size="2">INFO: Open of
`/var/www/cgi-bin/tests/aqidata.ovf'<br> using driver `VRT'
successful.</font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier">Layer name: aqidata<br>Geometry:
Polygon<br>Feature Count: 1<br>Layer SRS WKT:<br>(unknown)<br>NUM: Integer
(11.0)<br>ID: Integer (11.0)<br>poligono: Binary
(0.0)<br>OGRFeature(aqidata):1<br> NUM (Integer) = 1<br> ID (Integer) = 1<br>
poligono (Binary) =
504F4C59474F4E282833353030303020363237303030302C333530303030203632373530...</font></font></div>
<div><font face="Courier" size="2"> </font></div>
<div><font face="Arial" size="2"> </font></div>
<div><font face="Arial" size="2">5.- Then a created a MAP file:</font></div>
<div><font face="Courier" size="2"> </font></div>
<div><font face="Courier" size="2">MAP<br> NAME "Testing"<br> EXTENT -177773.12
6409691.13 525065 6511086<br> #IMAGETYPE JPEG<br> #IMAGETYPE PNG24<br>
IMAGETYPE PNG<br> IMAGECOLOR 255 255 255<br> STATUS ON<br> SIZE 400 400<br>
FONTSET "fonts.txt"<br> SYMBOLSET "symbols.txt"</font></div>
<div> </div><font size="2">
</font><div><font size="2"><br><font face="Courier"> WEB<br> METADATA<br> "key1"
"value1"<br> "key2" "value2"<br> "key3" "value3"<br> "key4"
"value4"<br> END<br> END</font></font></div>
<div><font size="2"> </font></div>
<div> </div>
<div><font face="Courier" size="2"> PROJECTION<br> "init=epsg:4326"<br>
END</font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier"> LAYER<br> NAME
"POLIGONO"<br> DEBUG ON<br> STATUS DEFAULT<br> TYPE POLYGON<br>
PROJECTION<br> "init=epsg:4326"<br> END<br> CONNECTIONTYPE OGR<br>
CONNECTION "aqidata.ovf"<br> DATA "aqidata"<br> CLASS<br> NAME
"MyClass"<br> STYLE<br> COLOR 0 0 0<br>
OUTLINECOLOR 255 0 0<br> SIZE 8<br> END<br> END<br>
END<br>END<br></font></font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier"> </font></font></div>
<div><font face="Arial" size="2">It doesn't show anything, just a white rectangle.
Not even an error. </font></div>
<div><font face="Arial" size="2"><font face="Courier"><font face="Arial">But when I
display just points it works fine (using
"PointsFromColumns").</font></font></font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier"><font face="Arial">I hope you
could help me.</font></font></font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier"><font face="Arial">Thanks,</font></font></font></div>
<div> </div>
<div><font face="Arial" size="2"><font face="Courier"><font face="Arial">Pablo Molina
S.</font></font></font></div>