[mapserver-dev] legend problem with label annotation

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Jan 3 15:31:49 EST 2012


Hi again: There was a post last week related to this that included a patch. Any chance you can test the patch the user supplied?

Steve

-----Original Message-----
From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Annabell Schelton Lima
Sent: Wednesday, December 28, 2011 7:01 PM
To: mapserver-dev at lists.osgeo.org
Subject: [mapserver-dev] legend problem with label annotation

Hello everyone,

I have a legend problem using MapServer 6.0.1, the legend icon image it´s not correctly generated when i use the atributte OFFSET in the label declaration. The image result  is strange if i change the OFFset parameter...Any idea about the problem?

Best Regards..

----- Mensaje original -----
De: Jachym Cepicky <jachym.cepicky at gmail.com>
Para: mapserver-dev at lists.osgeo.org
Enviado: Thu, 15 Dec 2011 19:01:21 -0500 (CST)
Asunto: [mapserver-dev] Re: bug in mapserver WFS 1.1 client and axis order?

I had a look into the mapserver source code, at mapwfslayer.c and I
would say, the wfs 1.1 axis order  issue is *NOT* handeled there.

My C skills together with my knowledge of the code base of mapserver
are too poor, but little experimenting gave me the WFS request, going
to remote server, with correct axes order in BBOX parameter:

Index: mapwfslayer.c
===================================================================
--- mapwfslayer.c	(revision 12900)
+++ mapwfslayer.c	(working copy)
@@ -431,11 +431,20 @@
         snprintf(pszURL + strlen(pszURL), bufferSize-strlen(pszURL),
"&FILTER=%s",
                  msEncodeUrl(psParams->pszFilter));
     }
-    else
-      snprintf(pszURL + strlen(pszURL), bufferSize-strlen(pszURL),
-               "&BBOX=%.15g,%.15g,%.15g,%.15g",
-               bbox->minx, bbox->miny, bbox->maxx, bbox->maxy);
-
+    else {
+        /* we have to take care on the axis order in WFS 1.1.0 */
+        if(strncmp(pszVersion,"1.1",3) == 0) {
+            /*
+            msFreeProjection(&lp->projection);
+            msLoadProjectionStringEPSG(&(lp->projection),
"epsg:4326"); <- brutal-force experiment method, this works
+            */
+            msAxisNormalizePoints(&(lp->projection) , 1,
&(bbox->minx), &(bbox->miny) );  /* <- this  does not work, there is
no epsgaxis=ne in the lp->projection */
+            msAxisNormalizePoints(&(lp->projection), 1,
&(bbox->maxx), &(bbox->maxy) );
+        }
+        snprintf(pszURL + strlen(pszURL), bufferSize-strlen(pszURL),
+            "&BBOX=%.15g,%.15g,%.15g,%.15g",
+            bbox->minx, bbox->miny, bbox->maxx, bbox->maxy); /* <-
minx is miny, miny is minx. same applies for max* coordinates
+    }
     if (psParams->nMaxFeatures > 0)
       snprintf(pszURL + strlen(pszURL), bufferSize-strlen(pszURL),
                "&MAXFEATURES=%d", psParams->nMaxFeatures);

The lp->projection does not contain "epsgaxis" parameter (used in
msAxisNormalizePoints), but then readed from EPSG string directly

msLoadProjectionStringEPSG(&(lp->projection), "epsg:4326");

it works.

I do not know, what is the best and safest way, how to make sure,
MapServer will take care about the correct axis order, when acting as
client for WFS 1.1, but the patch should point at least the point,
where to start

Would anybody be so kind and fix this issue?

Thanks

Jachym

2011/12/13 Jachym Cepicky <jachym.cepicky at gmail.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have a problem with MapServer, acting as WFS 1.1.0 client, trying to
> get data from WFS 1.1.0 (geoserver), in EPSG:4326. The axes order
> *should be* swapped, AFAIK in this case, but MapServer *does not* do
> this in the request in the BBOX parameter.
>
> Example:
>
> This is generated by MapServer and does not work (Czech Republic in
> form minx,miny,maxx,maxy)
>
> http://briseide01.ingr.briseide.eu:8080/geoserver/wfs?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=ccss:Flood2010_transport_roads&BBOX=14.8607842326919,50.8338629310625,15.393635878137,51.0495564151432
>
> And this returns some data - axis oder is Lat/Lon (miny,minx,maxy,maxx)
>
> http://briseide01.ingr.briseide.eu:8080/geoserver/wfs?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=ccss:Flood2010_transport_roads&BBOX=50.8338629310625,14.8607842326919,51.0495564151432,15.393635878137
>
> I've created ticket to this [1] with mapfile posted, the important
> part looks like follows:
>
> 70        LAYER
> 71          CONNECTION "http://briseide01.ingr.briseide.eu:8080/geoserver/ows?"
> 72          CONNECTIONTYPE WFS
> 73          DATA "Flood2010_transport_roads"
> 74          METADATA
> 75            "wfs_extent"      "14.9948950985 50.8659873396 15.2607258548
> 51.0177787275"
> 76            "wfs_request_method"      "GET"
> 77            "wms_extent"      "14.9948950985 50.8659873396 15.2607258548
> 51.0177787275"
> 78            "wfs_title"       "Flood2010_transport_roads"
> 79            "wfs_typename"    "ccss:Flood2010_transport_roads"
> 80            "gml_include_items"       "all"
> 81            "wfs_version"     "1.1.0"
> 82            "wms_title"       "Flood2010_transport_roads"
> 83            "wfs_srs"         "EPSG:4326"
> 84          END # METADATA
> 85          NAME "ccss:Flood2010_transport_roads"
> 86          PROJECTION
> 87            "init=epsg:4326"
> 88          END # PROJECTION
> 89          STATUS OFF
> 90          TEMPLATE "foo"
> 91          TILEITEM "location"
> 92          TYPE LINE
> 93          UNITS METERS
> 94          CLASS
> 95            STYLE
> 96              ANGLE 0
> 97              COLOR 238 153 0
> 98              OFFSET 0 0
> 99              OUTLINECOLOR 134 81 0
> 100             SIZE 5
> 101             WIDTH 5
> 102           END # STYLE
> 103         END # CLASS
> 104       END # LAYER
>
>
> Testing on mapserver-trunk
>
> Thanks
>
> Jachym
>
> [1] http://trac.osgeo.org/mapserver/ticket/4118
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk7miNYACgkQyKt0uAjU4I89egCfdGtWHL38EcQ0GVbHuq+24x+Z
> aAAAoLyktOmEXL3nYv3+198DzBTRxbKU
> =tXPU
> -----END PGP SIGNATURE-----



-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp
_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev


Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com



Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com
_______________________________________________
mapserver-dev mailing list
mapserver-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev

-------------- next part --------------
An embedded message was scrubbed...
From: Makoto Niwa <niwa at orkney.co.jp>
Subject: [mapserver-users] legend for annotation label
Date: Tue, 20 Dec 2011 03:15:27 +0000
Size: 12992
Url: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20120103/dfbdb553/attachment-0001.mht


More information about the mapserver-dev mailing list