[MapServer-users] OGR wkbMultiPolygon is working on 7.6.4 version?

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Sep 3 05:27:48 PDT 2024


Hi Carlos,

I'll put some points that I might go through, if I was in your shoes:

- use ogrinfo (on your .ovf) to get the extents of the layer, and add 
that to the MAP-level EXTENT parameter
- remove all other layers, and all PROJECTION blocks, for the test
- remove all validation parameters, and OPACITY
- change the layer STATUS to ON
- use the map2img command (shp2img for your version), with the switch 
"-all_debug 5"
- look in that response from map2img, for a query done to your database, 
and paste that query in MySQL's commandline tool (PostgreSQL has "psql", 
and if I remember correctly MySQL has "mysql" ?) to see if the exact 
query returns the correct response

But usually when I get an empty map it is because of a projection issue 
(that's why removing all projection blocks and other layers is a good test).

Maybe one of the above gives you can idea.

-jeff



-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/



On 2024-09-03 6:33 a.m., Carlos Neves (LREC) via MapServer-users wrote:
> Hi List,
> 
> I have a MultiPolygon Mysql Table with wildfire data (see below) running 
> on Mpaserver  version 7.6.4,  there is no error in the log, but the Map 
> doesn't display. Any Idea? Thanks in advance
> 
> The wildfire.ovf file:
> 
> <OGRVRTDataSource>
>      <OGRVRTLayer name="wildfire">
> <SrcDataSource>MYSQL:alarms,user=monitor,password=****,host=localhost,port=3306,tables=wildfire</SrcDataSource>
>          <SrcSQL>SELECT * FROM wildfire</SrcSQL>
>          <GeometryType>wkbMultiPolygon</GeometryType>
>      </OGRVRTLayer>
> </OGRVRTDataSource>
> 
> and a MAP file like:
> 
> LAYER  # WILDFIRE LAYER
>          NAME wildfire
>          CONNECTIONTYPE OGR
>           CONNECTION "wildfire.ovf"
>          TYPE POLYGON
>          STATUS DEFAULT
>          DATA "wildfire"
>          METADATA
>              "wms_title" "wildfire"
>              "qstring_validation_pattern" ".*"
>          END
> 
>           VALIDATION
> 
>              "qstring" ".*"
> 
>          END
> 
>          LABELITEM "AREA_HA"
> 
>          CLASS
>              NAME 'Wildfire Test'
>              STYLE
>                                  OUTLINECOLOR 0 0 0   #stroke
>                                  WIDTH .1
>                                  COLOR 255 0 0  #Red  Wildfire Polygon
>                                  OPACITY 50
> 
>              END
>              LABEL
>                      FONT "tahoma"
>                      TYPE TRUETYPE
>                       SIZE 5
>                       BUFFER 1
>                       FORCE TRUE
>                       POSITION CC
>                      COLOR 255 255 255
>              END #END LABEL
> 
>      END # CLASS
> 
> END #MAP
> 
> 
> Best Regards
> 
> Carlos
> 
> 
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users





More information about the MapServer-users mailing list