Re: [mapserver-users] Problem with ecw raster layer

2011-11-03 Thread Richard Greenwood
On Thu, Nov 3, 2011 at 5:31 AM, luis peinado  wrote:
> Hi list,
> I've been working for days trying to render a .ecw file using a raster
> layer.
> The same map file and ecw file work fine with other 2 servers (using Linux
> and different mapserver versions:4.6 and 5.6) as shown here:
> http://www.anthos.es/wms46/rjb/anthos/raster?REQUEST=GetMap&VERSION=1.1.1&LAYERS=nasa_240&STYLES=&SRS=EPSG:4326&FORMAT=image/jpeg&BBOX=-18.88692529000388,31.01113086496096,-7.695976464653308,40.51093762077761&WIDTH=761&HEIGHT=646&BGCOLOR=0xff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml&SERVICE=WMS
> On my new server (Scientific Linux and mapserver 5.6) I get a file with no
> images inside, and mapserver log does not explain any error, everything
> seems to be alright for it.
> The image shown is this:
> http://161.111.171.50/wms46/rjb/anthos/raster?REQUEST=GetMap&VERSION=1.1.1&LAYERS=nasa_240&STYLES=&SRS=EPSG:4326&FORMAT=image/jpeg&BBOX=-18.88692529000388,31.01113086496096,-7.695976464653308,40.51093762077761&WIDTH=761&HEIGHT=646&BGCOLOR=0xff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml&SERVICE=WMS
> Mapserver's log:
> [Thu Nov  3 12:28:40 2011].651297 CGI Request 1 on process 32018
> [Thu Nov  3 12:28:40 2011].655439 msDrawMap(): Layer 3 (nasa_240), 0.000s
> [Thu Nov  3 12:28:40 2011].655485 msDrawMap(): Drawing Label Cache, 0.000s
> [Thu Nov  3 12:28:40 2011].655491 msDrawMap() total time: 0.003s
> [Thu Nov  3 12:28:40 2011].698421 msSaveImage() total time: 0.043s
> [Thu Nov  3 12:28:40 2011].699261 mapserv request processing time (msLoadMap
> not incl.): 0.048s
> [Thu Nov  3 12:28:40 2011].699271 msFreeMap(): freeing map at 0x8927220.
> [Thu Nov  3 12:28:40 2011].946127 CGI Request 1 on process 32019
> [Thu Nov  3 12:28:40 2011].950267 msDrawMap(): Layer 3 (nasa_240), 0.000s
> [Thu Nov  3 12:28:40 2011].950312 msDrawMap(): Drawing Label Cache, 0.000s
> [Thu Nov  3 12:28:40 2011].950318 msDrawMap() total time: 0.003s
> [Thu Nov  3 12:28:40 2011].993148 msSaveImage() total time: 0.043s
> [Thu Nov  3 12:28:40 2011].993921 mapserv request processing time (msLoadMap
> not incl.): 0.048s
> [Thu Nov  3 12:28:40 2011].993930 msFreeMap(): freeing map at 0x1ec32220.
>
> And mapserver's version information:
>  /var/www/cgi-bin/mapserv -v
> MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
> SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
> So, can someone help telling me where to look for the error?
> Thanks a lot for any help or suggestion.
>
> --
>
> Lluís

ECW is a proprietary format and thus may not have been installed with
your Linux distro. I'm not familiar with Scientific Linux so I don't
know. If you do have ECW support it would be handled by GDAL, which
you have as evidenced by INPUT=GDAL, so you need to determine if GDAL
has ECW support, which is pretty easy. In the shell:
   gdalinfo --formats
or better yet
   gdalinfo --formats | grep -i ecw
will list the formats tha GDAL can handle in your setup.

If ECW isn't in the list then you need to install or build supporting
libraries, but I have no idea how you do that in Scientific Linux.

HTH,
Rich

-- 
Richard Greenwood
richard.greenw...@gmail.com
www.greenwoodmap.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] OpenLayers JSONP getFeatureInfo

2011-11-03 Thread Puneet Kishor
David,

On Nov 3, 2011, at 2:17 PM, Fawcett, David (MPCA) wrote:

> I posted a similar question to the OpenLayers list, but know that there isn't 
> complete overlap.  
> 
> Can anyone point me to an example that uses JSONP to get around the same 
> origin policy when making a getFeatureInfo request from OpenLayers to 
> MapServer?
> 


Not a direct answer to your question, but two alternative approaches that might 
work rather well (I used getFeatureInfo only briefly, but then gave up on it) --

1. Use something like jQuery (my Js weapon of choice) to construct an ajax 
query. A JSONP query requires just one additional letter "P".

2. Use a proxy. Remember, a few days ago I was asking about how to specify 
different classes in the browser address bar (in the URI) and use that to 
specify which classes are rendered by MapServer? I solved that by using a 
proxy... just a couple of lines of Perl, and that was solved.

A bonus hint -- if your data are in Pg, don't even bother with getFeatureInfo. 
Just query the db directly and return the data as JSON (or, JSONP, in this 
case).

--
Puneet Kishor___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] OpenLayers JSONP getFeatureInfo

2011-11-03 Thread Fawcett, David (MPCA)
I posted a similar question to the OpenLayers list, but know that there isn't 
complete overlap.  

Can anyone point me to an example that uses JSONP to get around the same origin 
policy when making a getFeatureInfo request from OpenLayers to MapServer?

Is it possible?

Thanks, 

David.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MapServer & feature datasets

2011-11-03 Thread Nuno Leitão
Hi,



I am trying to establish a connection to a Spatial Database Engine (SDE)
and I am using the following parameters:



CONNECTIONTYPE PLUGIN

PLUGIN "C:/ms4w/Apache/specialplugins/msplugin_sde_92.dll"



All my information (shape files) is inside different feature datasets in my
Database.

However, if I keep my shape files inside feature datasets, I can access the
WMS, but I cannot do the operation GetFeatureInfo in the map as my WFS does
not work.

However, when I move the shape file out of the feature dataset, I can do
the operation GetFeatureInfo in the map and I my WFS is perfect.



I am using ArcSDE 9.2 and my MapServer version is 5.6.6.



Did anyone have this problem? There is any solution for WMS and WFS that
includes shape files inside feature datasets in a Spatial Database Engine
(SDE)?



Many thanks in advance.

Best regards,

Nuno
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] GetMap Issue

2011-11-03 Thread Asad Ullah
List,
I have an issue with getting a composite map of a number of layers. As you see 
it only return the top layer whereas it should show a multilayer image.  Any 
help would really be appreciated.

My url is something like:

http://lance2.modaps.eosdis.nasa.gov/cgi-bin/mapserv.cgi?map=usecase_all_download_2002.map&LAYERS=Terra250+Terra_snow_cover+fires24+Admin_Bound&mode=map&imgext=-94.4722+28.7876+-88.6714+33.2041&mapext=-94.4722+28.7876+-88.6714+33.2041&map_size=2640.327719617658+2010.2412380518867&imgx=2640.327719617658&imgy=2010.2412380518867&imgxy=2640.327719617658+2010.2412380518867&map_imagetype=JPEG

and my part of mapfile is:

MAP
NAME "usecase"
UNITS dd
MAXSIZE 2
SIZE 1600 1200
IMAGECOLOR -1 -1 -1
IMAGETYPE  "AGG"
SHAPEPATH "/MODAPSweb"
PROJECTION
"init=epsg:4326"
END
 EXTENT -178.00 -80.00 183.00 80.00
WEB
IMAGEPATH "/MODAPSweb/www/wms/tmp/"
IMAGEURL "/tmp/"
END
LAYER
 NAME "Terra250"
TYPE RASTER
STATUS ON
OFFSITE 0 0 0
  PROJECTION
"init=epsg:4326"
  END
  DATA "share/vrtfile/terr_250m_2011306.vrt"
CLASS
  STYLE
BACKGROUNDCOLOR 255 255 255
  END
END
END
  LAYER
NAME "Admin_Bound"
TYPE LINE
STATUS ON
  PROJECTION
"init=epsg:4326"
  END
DATA "share/vrtfile/esri-administrative-boundaries_level-1"
  CLASS
STYLE
COLOR 0 0 0
WIDTH 0.5
  END
  END
   END
LAYER
 NAME "Terra_snow_cover"
TYPE RASTER
STATUS ON
OFFSITE 0 0 0
  PROJECTION
"init=epsg:4326"
  END
DATA "share/vrtfile/MOR10FSCLLDY_2011306.vrt"
VALIDATION
  'DATA' '^MOR10FSCLLDY_.*\.vrt$'
END
CLASS
  STYLE
BACKGROUNDCOLOR -1 -1 -1
  ENDEND
END
LAYER
  NAME "fires24"
  TYPE RASTER
  STATUS ON
TRANSPARENCY 100
OFFSITE 255 255 255
  CONNECTION "http://firefly.geog.umd.edu/wms/wms?";
  CONNECTIONTYPE WMS
  METADATA
"wms_title" "Fires - Past 24 hours"
"wms_name""fires24"
"wms_onlineresource"
"http://firefly.geog.umd.edu/wms/wms?";
"wms_srs"   "EPSG:4326"
"wms_server_version""1.1.1"
"wms_format""image/png"
  END
PROJECTION
"init=epsg:4326"
 END
END
OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGBA
  EXTENSION "png"
  TRANSPARENT ON
END
OUTPUTFORMAT
  NAME "agg"
  DRIVER AGG/PNG
  MIMETYPE "image/png"
  IMAGEMODE RGBA
END
OUTPUTFORMAT
  NAME 'AGG'
  DRIVER "AGG/jpeg"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  EXTENSION "jpg"
END
END

Thanks,

Asad

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: CLUSTER and GetFeatureInfo

2011-11-03 Thread Florian D.
Hi Tamas,

I played around a little bit with a clustered Layer that has
"CLUSTER_GET_ALL_SHAPES=ON" and "ITEMS=id" as processing options. I'm using
trunk of course, and i noticed one thing:

I have a cluster that is made up of 2 features. When i make a feature info
request to the cluster, it returns GML. The GML contains two items: 




394




2





As you can see, the first feature is returned correctly. However the second
feature doesn't have its original attributes, but instead has the cluster's
attributes. When i test this in different scenarios, i always end up with
one missing feature - the one that has "become" the cluster (not sure about
the implementation details).

Have you maybe experienced the same behavior or do you have an idea why this
is happening. Maybe i'm just missing something in the Mapfile. I could
deliver some SQL + Mapfile to reproduce this, if needed.

Thanks
Florian

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/CLUSTER-and-GetFeatureInfo-tp6428949p6959697.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] GetMap Issue

2011-11-03 Thread Asad Ullah
List,
I have an issue with getting a composite map of a number of layers. As you see 
it only return the top layer whereas it should show something like the image 
attached.  Any help would really be appreciated.

My url is something like:

http://lance2.modaps.eosdis.nasa.gov/cgi-bin/mapserv.cgi?map=usecase_all_download_2002.map&LAYERS=Terra250+Terra_snow_cover+fires24+Admin_Bound&mode=map&imgext=-94.4722+28.7876+-88.6714+33.2041&mapext=-94.4722+28.7876+-88.6714+33.2041&map_size=2640.327719617658+2010.2412380518867&imgx=2640.327719617658&imgy=2010.2412380518867&imgxy=2640.327719617658+2010.2412380518867&map_imagetype=JPEG

and my part of mapfile is:

MAP
NAME "usecase"
UNITS dd
MAXSIZE 2
SIZE 1600 1200
IMAGECOLOR -1 -1 -1
IMAGETYPE  "AGG"
SHAPEPATH "/MODAPSweb"
PROJECTION
"init=epsg:4326"
END
 EXTENT -178.00 -80.00 183.00 80.00
WEB
IMAGEPATH "/MODAPSweb/www/wms/tmp/"
IMAGEURL "/tmp/"
END
LAYER
 NAME "Terra250"
TYPE RASTER
STATUS ON
OFFSITE 0 0 0
  PROJECTION
"init=epsg:4326"
  END
  DATA "share/vrtfile/terr_250m_2011306.vrt"
CLASS
  STYLE
BACKGROUNDCOLOR 255 255 255
  END
END
END
  LAYER
NAME "Admin_Bound"
TYPE LINE
STATUS ON
  PROJECTION
"init=epsg:4326"
  END
DATA "share/vrtfile/esri-administrative-boundaries_level-1"
  CLASS
STYLE
COLOR 0 0 0
WIDTH 0.5
  END
  END
   END
LAYER
 NAME "Terra_snow_cover"
TYPE RASTER
STATUS ON
OFFSITE 0 0 0
  PROJECTION
"init=epsg:4326"
  END
DATA "share/vrtfile/MOR10FSCLLDY_2011306.vrt"
VALIDATION
  'DATA' '^MOR10FSCLLDY_.*\.vrt$'
END
CLASS
  STYLE
BACKGROUNDCOLOR -1 -1 -1
  ENDEND
END
LAYER
  NAME "fires24"
  TYPE RASTER
  STATUS ON
TRANSPARENCY 100
OFFSITE 255 255 255
  CONNECTION "http://firefly.geog.umd.edu/wms/wms?";
  CONNECTIONTYPE WMS
  METADATA
"wms_title" "Fires - Past 24 hours"
"wms_name""fires24"
"wms_onlineresource"
"http://firefly.geog.umd.edu/wms/wms?";
"wms_srs"   "EPSG:4326"
"wms_server_version""1.1.1"
"wms_format""image/png"
  END
PROJECTION
"init=epsg:4326"
 END
END
OUTPUTFORMAT
  NAME png
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGBA
  EXTENSION "png"
  TRANSPARENT ON
END
OUTPUTFORMAT
  NAME "agg"
  DRIVER AGG/PNG
  MIMETYPE "image/png"
  IMAGEMODE RGBA
END
OUTPUTFORMAT
  NAME 'AGG'
  DRIVER "AGG/jpeg"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  EXTENSION "jpg"
END
END

Thanks,

Asad

<>___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] How ro get transparent image on 6.0.1

2011-11-03 Thread thomas bonfort
Either your asp page is selecting the wrong (i.e. a non-transparent)
imagetype, or you have a layer that is drawn ontop of the transparent
background, thus making the final image non transparent. The
outputformat you have shown is correct and produces trasnparent
images.

--
thomas

On Thu, Nov 3, 2011 at 14:46, Janeks Kamerovskis
 wrote:
> Hi,
>
> I recently moved to 6.0.1, but stumped to getting transparent image.
>
> I used following syntaxis in my map file:
>
>    IMAGECOLOR 255 255 255
>
>    OUTPUTFORMAT
>        NAME "png"
>        DRIVER AGG/PNG
>        MIMETYPE "image/png"
>        IMAGEMODE RGBA
>        EXTENSION "png"
>        FORMATOPTION "GAMMA=0.75"
>        TRANSPARENT ON
>    END
>
>    IMAGETYPE png
>
> But my request is still getting nontransparent image:
> http://10.162.129.14/MapApp/wms_rs.asp?LAYERS=rs&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A25884&BBOX=166509.5,6040766.7857144,908910.5,6571053.2142856&WIDTH=1050&HEIGHT=750
>
> What could be wrong?
>
> brgds & thanks in advance
> Janeks
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] How ro get transparent image on 6.0.1

2011-11-03 Thread Janeks Kamerovskis

Hi,

I recently moved to 6.0.1, but stumped to getting transparent image.

I used following syntaxis in my map file:

IMAGECOLOR 255 255 255

OUTPUTFORMAT
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "GAMMA=0.75"
TRANSPARENT ON
END

IMAGETYPE png

But my request is still getting nontransparent image:
http://10.162.129.14/MapApp/wms_rs.asp?LAYERS=rs&TRANSPARENT=true&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A25884&BBOX=166509.5,6040766.7857144,908910.5,6571053.2142856&WIDTH=1050&HEIGHT=750

What could be wrong?

brgds & thanks in advance
Janeks
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Problem with ecw raster layer

2011-11-03 Thread luis peinado
Hi list,
I've been working for days trying to render a .ecw file using a raster
layer.

The same map file and ecw file work fine with other 2 servers (using Linux
and different mapserver versions:4.6 and 5.6) as shown here:
http://www.anthos.es/wms46/rjb/anthos/raster?REQUEST=GetMap&VERSION=1.1.1&LAYERS=nasa_240&STYLES=&SRS=EPSG:4326&FORMAT=image/jpeg&BBOX=-18.88692529000388,31.01113086496096,-7.695976464653308,40.51093762077761&WIDTH=761&HEIGHT=646&BGCOLOR=0xff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml&SERVICE=WMS

On my new server (Scientific Linux and mapserver 5.6) I get a file with no
images inside, and mapserver log does not explain any error, everything
seems to be alright for it.
The image shown is this:
http://161.111.171.50/wms46/rjb/anthos/raster?REQUEST=GetMap&VERSION=1.1.1&LAYERS=nasa_240&STYLES=&SRS=EPSG:4326&FORMAT=image/jpeg&BBOX=-18.88692529000388,31.01113086496096,-7.695976464653308,40.51093762077761&WIDTH=761&HEIGHT=646&BGCOLOR=0xff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml&SERVICE=WMS

Mapserver's log:

[Thu Nov  3 12:28:40 2011].651297 CGI Request 1 on process 32018
[Thu Nov  3 12:28:40 2011].655439 msDrawMap(): Layer 3 (nasa_240), 0.000s
[Thu Nov  3 12:28:40 2011].655485 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Nov  3 12:28:40 2011].655491 msDrawMap() total time: 0.003s
[Thu Nov  3 12:28:40 2011].698421 msSaveImage() total time: 0.043s
[Thu Nov  3 12:28:40 2011].699261 mapserv request processing time
(msLoadMap not incl.): 0.048s
[Thu Nov  3 12:28:40 2011].699271 msFreeMap(): freeing map at 0x8927220.
[Thu Nov  3 12:28:40 2011].946127 CGI Request 1 on process 32019
[Thu Nov  3 12:28:40 2011].950267 msDrawMap(): Layer 3 (nasa_240), 0.000s
[Thu Nov  3 12:28:40 2011].950312 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Nov  3 12:28:40 2011].950318 msDrawMap() total time: 0.003s
[Thu Nov  3 12:28:40 2011].993148 msSaveImage() total time: 0.043s
[Thu Nov  3 12:28:40 2011].993921 mapserv request processing time
(msLoadMap not incl.): 0.048s
[Thu Nov  3 12:28:40 2011].993930 msFreeMap(): freeing map at 0x1ec32220.


And mapserver's version information:
 /var/www/cgi-bin/mapserv -v
MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

So, can someone help telling me where to look for the error?
Thanks a lot for any help or suggestion.


-- 

*Lluís *
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE: projection inline and 900913 or 4326 within the epsg file

2011-11-03 Thread Sumit Sharma

Hi David,IMHO by "inline" documentation is referring to projection block in 
mapfile. You can use projection block defined by you directly in layer or map 
definition. However, if your layers are in same projection as of map (output 
projection) you may also avoid layer projection block.Hope it helps.-Sumit
 Date: Thu, 3 Nov 2011 02:01:12 -0700
From: ml-node+s1803224n6958307...@n2.nabble.com
To: sumit...@hotmail.com
Subject: projection inline and 900913 or 4326 within the epsg file



Dear All,


Mainly, I use these projections: (my epsg file)


#GOOGLE

<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <>

# WGS 84

<4326> +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  <>


Reading this wonderful link: http://mapserver.org/optimization/index.html I 
wanted to add the projection inline instead of reading the epsg file (only 4 
projections inside).


How can I convert this:


<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 
+y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs <>


To:


PROJECTION

  "proj=utm"

  "ellps=GRS80"

  "datum=NAD83"

  "zone=15"

  "units=m"

  "north"

  "no_defs"

END


(http://mapserver.org/optimization/mapfile.html)


Thanks!


David







If you reply to this email, your message will be added to the 
discussion below:

http://osgeo-org.1803224.n2.nabble.com/projection-inline-and-900913-or-4326-within-the-epsg-file-tp6958307p6958307.html


To start a new topic under Mapserver - User, email 
ml-node+s1803224n1969211...@n2.nabble.com 

To unsubscribe from Mapserver - User, click here.
  

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/projection-inline-and-900913-or-4326-within-the-epsg-file-tp6958307p6958325.html
Sent from the Mapserver - User mailing list archive at Nabble.com.___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] arrow head doesn't draw at the end

2011-11-03 Thread Havard Tveite

An update regarding RFC45:

Thomas B. has now implemented SYMBOL ANCHORPOINT, which can
be used to specify the anchor point of a symbol.  With this
functionality, it is very easy to implement symbols that is
to be placed and rotated according to something else than
their centre point.
I have tested mapserver trunk, and it works like a charm.
It is also documented in the trunk documentation.

http://www.mapserver.org/trunk/mapfile/symbol.html

So there is reason to look forward to 6.2!

Håvard

On 9/28/2011 4:25 PM, Håvard Tveite wrote:

With a point layer, you can fix this using the offset trick I
referred to in my earlier post:

The following works for me using Mapserver 6 (the arrow head is
centred at the point, but you can shift it using the same
technique as shown for the arrow line)

 SYMBOL
   NAME "up"
   TYPE vector
   POINTS
 0  10
 5  0
 10 10
   END
 END

 SYMBOL
   NAME "vert-line"
   TYPE vector
   POINTS
 0 5
 0 10
   END
 END

 ...
   CLASS
 STYLE
   SYMBOL "vert-line"
   ANGLE [az]
   SIZE [rate]
   COLOR 0 0 0
   WIDTH 1
 END # STYLE
 STYLE
   SYMBOL "up"
   ANGLE [az]
   SIZE 5
   WIDTH 2
   COLOR 0 0 0
 END # STYLE
   END # CLASS

In my opinion, the best thing would be to be able to specify
the "centre/origin" of the point explicitly, as suggested in
RFC45.  But this part of the RFC has not yet been implemented.

Håvard


On 9/27/2011 4:48 PM, Puneet Kishor wrote:


On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:


Have you seen:

http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol



Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear 
as crystal to the rest of the world, but I can't fathom anything there 
applicable to me. I am facing four problems --

1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" 
in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as 
the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the 
same direction as the arrow stems.

2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. 
When used with ANGLE AUTO, it can for instance be used to render an arrowhead." 
Well, no... it is *not* producing the *last point of the geometry* as I understand it. 
Instead, it is producing the middle point of the geometry. And it sure as as I can see is 
not working with ANGLE AUTO (see #1 above).

3. I have tried several variations on my arrow head to try shift its center, 
but I am failing to translate the information in the above document to be able 
to do it correctly.

4. Perhaps most important: the length of the arrow is varying based on [rate]. In other 
words, I want only the stem to be shorter or longer, but the arrow head to be the same 
size, and to be at the "end" of the stem always. In fact, there are instances 
in which [rate] could be equal to zero. In those instances I don't want any arrow to be 
drawn at all.

*** In other words, I want an arrow stem to be as long as the varying [rate], 
and if the stem has a length greater than zero then and only then do I want an 
arrow head at the end of the stem pointing in the same direction as the stem. 
***

I even tried using a truetype font symbol, but I get no image at all but no 
error as well.

I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I 
realize that if I could make that work, it would still be unsatisfactory 
because as MapServer would scale my arrow image, it would make the attached 
arrow head also larger, and that would look ugly. In any case, I couldn't get 
that to work as well... no image at all, but no error as well.

Could be my compilation of MapServer was buggy, but I didn't see any 
compilation time errors, and other than the above oddities, it works quite well.

$./mapserv -v
MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE

I would love to know if my *** objective *** above can be accomplished with 
MapServer. If not, I would look at other workaround. I am currently rendering 
arrows using OpenLayers vector layer... it works quite well, but is slow... 
MapServer is much faster, and could be cached, hence my desire to use MapServer.

Thanks.




Håvard Tveite

On 9/27/2011 4:12 AM, Puneet Kishor wrote:

My arrows look like so -->-- instead of >with declarations like so

  SYMBOL
  NAME "vert-line"
  TYPE vector
  POINTS
  0 1
  0 0
  END
  END

   SYMBOL
  NAME "up"
  TYPE vector
  POINTS

AW: [mapserver-users] Re: Reaspect?

2011-11-03 Thread Eichner, Andreas - SID-NLKM

The WMS standard was written this way to support display devices with
non-square pixels. So it seems to me that you don't want to use a WMS
service. You should really consider using MapServer with "mode=map".
This mode is more appropriate for custom web applications while the WMS
standard is used to increase interoperability.

> That's pretty much what we've decided to do, although the 
> resulting image is
> no longer square. We could, of course, do that, too. But this 
> seems like
> work that really belongs on the server, not on the client 
> side, where all I
> want to do is request an image and have it passed back to me, 
> trimmed the
> way I asked.
> 
> 
> Rahkonen Jukka wrote:
> > 
> > Hi,
> > 
> > That's how the WMS standard is written.  Request must 
> contain BBOX, WIDTH
> > and HEIGHT and server must respect them all. 
> > Reaspect parameter does do something useful against some 
> ArcIMS servers
> > which are configured in a certain way. 
> > Could you describe mose closely when would you need so muct 
> new code? 
> > Isn't taking the BBOX and calculating  MaxX-MinX and 
> MaxY-MinY, and then
> > taking either WIDTH or HEIGHT as given and calculating the 
> missing one
> > good enough for your use case?
> > 
> > -Jukka Rahkonen-
> > 
> > SixDegrees wrote:
> > 
> >> That makes me sad, because I really need an ability 
> similar to what I've
> > described. I can probably pull it off on my own, but that 
> will require a
> > fair amount of new code to accommodate pixels  that are 
> widely different
> > in
> > width and height in many of our images.
> > 
> >> A capability similar to HTML's IMG tag, where the WIDTH 
> and HEIGHT are
> > strictly obeyed when both are present, but the original 
> image's aspect
> > ratio
> > is maintained when one or the other is left off, would be ideal.
> > 
> > I really hope this is not correct, and that the reaspect 
> parameter will do
> > something useful. I can experiment tomorrow when I'm back 
> at the server.
> > 
> > 
> > Rahkonen Jukka wrote:
> >>
> >> Hi,
> >>
> >> Reaspect does not seem to do anything with Mapserver acting as WMS
> >> server.
> >> The example here http://mapserver.org/trunk/faq.html is 
> for Mapserver
> >> acting as a WMS client and reading data from some ArcIMS servers.
> >>
> >> -Jukka Rahkonen-
> >>
> >> SixDegrees wrote:
> >>
> >>> Can someone provide an example of what the 'reaspect' 
> parameter of a wms
> >> request will do when Mapserver receives it in a GetMap 
> request? As I
> >> understand it (poorly) the WIDTH and HEIGHT will remain 
> the same, but if
> >> 'reaspect=true' the BBOX may be adjusted so the aspect ratio of the
> >> projected image is preserved and WIDTH and HEIGHT just 
> specify a "window"
> >> onto this "correctly" proportioned rendering, while if 
> 'reaspect=false'
> >> the
> >> BBOX is retained along with WIDTH and HEIGHT and the image is
> >> stretched/squished to fit. Is this correct, or am I completely
> >> misunderstanding this?
> >>
> >>> Also, if the above is true and 'reaspect=true' is set, how is the
> >>> "window"
> >> defined by WIDTH and HEIGHT placed onto the image? Is it 
> centered with
> >> respect to the BBOX? Placed against one of the corners? Or 
> something else
> >> altogether?
> >>
> >> --
> >> View this message in context:
> >> 
> http://osgeo-org.1803224.n2.nabble.com/Reaspect-tp6953208p6953208.html
> >> Sent from the Mapserver - User mailing list archive at Nabble.com.
> >> ___
> >> mapserver-users mailing list
> >> mapserver-users@.osgeo
> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >> ___
> >> mapserver-users mailing list
> >> mapserver-users@.osgeo
> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >>
> > 
> > 
> > --
> > View this message in context:
> > 
> http://osgeo-org.1803224.n2.nabble.com/Reaspect-tp6953208p6953294.html
> > Sent from the Mapserver - User mailing list archive at Nabble.com.
> > ___
> > mapserver-users mailing list
> > mapserver-users@.osgeo
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > ___
> > mapserver-users mailing list
> > mapserver-users@.osgeo
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Reaspect-tp6953208p6955963.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users