Re: [mapserver-users] WMS SLD Troubles

2011-02-09 Thread Frank Broniewski

Hello,

thank you for your kind help :-) I've put the requested informations below.


Frank


INFO:

we're using
/usr/lib/cgi-bin/mapserv -v
MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE 
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT 
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER 
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS 
SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL 
INPUT=SHAPEFILE

on Ubuntu 8.04 with the ubuntu-gis ppa.




Original layer definition:

LAYER
NAME post
STATUS Off
CONNECTIONTYPE Postgis
CONNECTION host=localhost dbname=osm user= password= port=5432
DATA nway FROM
(SELECT way as nway, osm_id, amenity, name
FROM planet_osm_point
WHERE amenity='post_box' OR amenity='post_office'
)
   as foo using unique osm_id using SRID=900913
TYPE Point
PROCESSING CLOSE_CONNECTION=DEFER
CLASSITEM amenity
DUMP true

# ---
# Projection configuration
# ---
INCLUDE /usr/local/mapconf/share/projections/google.map

METADATA
# lots of metadata 
END 
END






the SLD:
NamedLayer
Namepost/Name
UserStyle
  TitlePost/Title
  FeatureTypeStyle
Rule
ogc:Filter
ogc:PropertyIsEqualTo
ogc:PropertyNameamenity/ogc:PropertyName
ogc:Literalpost_box/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:Filter
PointSymbolizer
Graphic
  ExternalGraphic
OnlineResource
  xlink:type=simple

xlink:href=http://192.168.0.111:8502/sld/img/briefkasten.png; /
Formatimage/png/Format
  /ExternalGraphic
  Size40/Size
/Graphic
/PointSymbolizer
/Rule
Rule
Filter
PropertyIsEqualTo
PropertyNameamenity/PropertyName
Literalpost_office/Literal
/PropertyIsEqualTo
/Filter
PointSymbolizer
Graphic
  ExternalGraphic
OnlineResource
  xlink:type=simple

xlink:href=http://192.168.0.111:8502/sld/img/posthorn.png; /
Formatimage/png/Format
  /ExternalGraphic
  Size40/Size
/Graphic
/PointSymbolizer
/Rule
  /FeatureTypeStyle
/UserStyle
/NamedLayer







the generated map file:
  LAYER
CLASSITEM amenity
CONNECTION host=localhost dbname=osm user= password= port=5432
CONNECTIONTYPE POSTGIS
DATA nway FROM
(SELECT way as nway, osm_id, amenity, name
FROM planet_osm_point
WHERE amenity='post_box'
OR amenity='post_office'
)
   as foo using unique osm_id using SRID=900913
DUMP TRUE
METADATA
# metadata
END
NAME post
PROCESSING CLOSE_CONNECTION=DEFER
PROJECTION
  proj=merc
  a=6378137
  b=6378137
  lat_ts=0
  lon_0=0
  x_0=0
  y_0=0
  k=1
  nadgrids=@null
  units=m
  no_defs
END
STATUS ON
TYPE POINT
UNITS METERS
CLASS
  NAME Unknown
  EXPRESSION ([amenity] = post_box)
  STYLE
ANGLE 360
COLOR 0 0 0
SIZE 40
SYMBOL http://192.168.0.111:8502/sld/img/briefkasten.png;
WIDTH 1
  END
END
  END




Am 08.02.2011 15:57, schrieb Yewondwossen Assefa:

What version of MapServer?

Also, what is the part in the map file that is causing the problem:
* if you remove the EXPRESSION ([amenity] = post_box) from the
generated map, will that work
* Is the layer's FILTER element set (on the generated map)? If so what
is the value?

A full layer definition in the generated map would be useful. A full sld
might also help.

regards,


On 07/02/2011 4:58 AM, Frank Broniewski wrote:

Hello,

We're using a OpenStreetMap Postgis database as a source for our
geo-servers. We want to provide WMS and WFS services on the data. In
order to do the styling only once, we are using SLDs, which works
mostly fine.

One of our layers does not render as a WMS, it throws a
msEvalRegex(): Regular expression error. String failed expression
test. Error during execution.

We identified the layer, and it's the one rendering post boxes. The
corresponding SLD definition is using a filter:


Filter
PropertyIsEqualTo
PropertyNameamenity/PropertyName
Literalpost_office/Literal
/PropertyIsEqualTo
/Filter


Using debug-level 5, the mapfile after SLD 

Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

2011-02-09 Thread Milo van der Linden
Hello Andreas;

What return type of getfeatureinfo are you using?
There are three possibilities: http://mapserver.org/ogc/wms_server.html

1. text/plain
2. text/html
3. gml

If you use text/html; you can set the character encoding to windows ansi:

http://www.w3.org/International/questions/qa-html-encoding-declarations#quicklookup

If you use GML, because it is a flavour of XML, mapserver MUST serve
UNICODE:(UTF-8 or UTF-16);http://www.w3.org/TR/REC-xml/#sec-well-formed  So
if the gml output is not converted to unicode; please file a ticket for this
matter in the osgeo trac database.


2011/2/8 Tom van der Putte t...@vdputte.nl

 Hi Andreas,

 i looked it up, you can find it here:

 http://resources.arcgis.com/content/kbase?fa=articleShowd=21106

 Unfortunately I'm not aware of any means to automate the process of
 exporting the shapefiles, so you'd have to do it by hand.

 Tom

 ___
 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


Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

2011-02-09 Thread Milo van der Linden
I found a ticket that is related to this issue:
http://trac.osgeo.org/gdal/wiki/rfc23_ogr_unicode


2011/2/9 Milo van der Linden m...@dogodigi.net

 Hello Andreas;

 What return type of getfeatureinfo are you using?
 There are three possibilities: http://mapserver.org/ogc/wms_server.html

 1. text/plain
 2. text/html
 3. gml

 If you use text/html; you can set the character encoding to windows ansi:


 http://www.w3.org/International/questions/qa-html-encoding-declarations#quicklookup

 If you use GML, because it is a flavour of XML, mapserver MUST serve
 UNICODE:(UTF-8 or UTF-16);http://www.w3.org/TR/REC-xml/#sec-well-formed
 So if the gml output is not converted to unicode; please file a ticket for
 this matter in the osgeo trac database.


 2011/2/8 Tom van der Putte t...@vdputte.nl

  Hi Andreas,

 i looked it up, you can find it here:

 http://resources.arcgis.com/content/kbase?fa=articleShowd=21106

 Unfortunately I'm not aware of any means to automate the process of
 exporting the shapefiles, so you'd have to do it by hand.

 Tom

 ___
 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


RE: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

2011-02-09 Thread Siegel Andreas
Hi Tom.
 
Thanks for your reply. But no, it is not an issue with ArcGIS.
The link you sent me may prove useful anyway since we rely heavy on shapefiles 
and ArcGIS ist used by several of our colleges and contributors.
 
My issue is this line of code:
meta http-equiv=Content-Type content=text/html; charset=MacThai/meta
Please note the charset MacThai. 
This charset should render my results illegible but it has no effect at all.
 
I test it by using a browser:
http://vogis.cnv.at/mapserver/mapserv?map=a.mapLAYERS=umlauttestSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application/vnd.ogc.se_xmlFORMAT=image/jpegSRS=EPSG:31254BBOX=-49500,246750,-49000,247250X=250Y=250INFO_FORMAT=text/htmlQUERY_LAYERS=umlauttestWIDTH=650HEIGHT=650FEATURE_COUNT=30
 
 and the commandline.
./mapserv -nh 
QUERY_STRING=map=a.mapLAYERS=umlauttestSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application/vnd.ogc.se_xmlFORMAT=image/jpegSRS=EPSG:31254BBOX=-49500,246750,-49000,247250X=250Y=250INFO_FORMAT=text/htmlQUERY_LAYERS=umlauttestWIDTH=650HEIGHT=650FEATURE_COUNT=30

The commandline output can be inspected by hexdump -C
 
./mapserv -nh 
QUERY_STRING=map=a.mapLAYERS=umlauttestSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application/vnd.ogc.se_xmlFORMAT=image/jpegSRS=EPSG:31254BBOX=-49500,246750,-49000,247250X=250Y=250INFO_FORMAT=text/htmlQUERY_LAYERS=umlauttestWIDTH=650HEIGHT=650FEATURE_COUNT=30
 | hexdump -c
 
This allows to inspect the result without some unwanted/unnoticed code 
translations when using an editor or the browser,

This are the HTML-Templates:
Header:
!-- MapServer Template --
 
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/transitional.dtd 
http://www.w3.org/TR/html4/transitional.dtd 
 
html
 
head
 
 !-- enforce the client to display result html as UTF-8 encoding --
 meta http-equiv=Content-Type content=text/html; charset=MacThai/meta
 
 style type=text/css
 
  table, th, td {
   border:1px solid #e5e5e5;
   border-collapse:collapse;
   font-family: arial;
   font-size: 80%;
   color: #33
  }
 
  th, td {
   valign: top;
   text-align: center;
  }
 
 th {
  background-color: #aed7ff
 }
 
 caption {
  border:1px solid #e5e5e5;
  border-collapse:collapse;
  font-family: arial;
  font-weight: bold;
  font-size: 80%;
  text-align: left;
  color: #33;
 }
 
 /style
 titleGetFeatureInfo Response/title
/head
 
body
 table
 
  captionWidmungsart Zeichensatztest ae ä oe ö ue ü AE Ä OE Ö UE Ü scharfes s 
ß Ende/caption
 
 tbody
  thKuerzel/th
  thWidmungsart/th
  thFlaeche/th
  thText/th
 
 
TEMPLATE:
 !-- MapServer Template --
 tr
   td[item name=WI_EM_KN format=$value escape=none]/td
   td[item name=WI_EM_TXT format=$value escape=none]/td
   td[item name=Flaeche format=$value escape=none]/td
   td[item name=FS_TXT  format=$value escape=none]/td
 /tr
 
 
FOOTER:
 !-- MapServer Template --
   /tbody
 /table
 br/
   /body
/html
 
 
 
 
 


 
 
 
 
 
 
 
Mag Andreas Siegel
Landesvermessungsamt Feldkirch
Johannitergasse 6, A-6800 Feldkirch
Tel: +43(0) 5522 / 75482 - 60227
Fax: +43(0) 5522 / 75482 - 6
E-Mail: andreas.sie...@vorarlberg.at 
mailto:andreas.andreas.sandreas.sie...@vorarlberg.at 
http://www.vorarlberg.at/lva
 
Rechtsverbindlichen Schriftverkehr
(zB Anträge, Rechtsmittel) richten Sie an:
E-Mail: landesvermessungs...@vorarlberg.at
Fax: +43(0)5522/75482-6
 
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

2011-02-09 Thread Milo van der Linden
There are errors in the usage of 

I think that:

meta http-equiv=Content-Type content=text/html;
charset=x-mac-thai/meta

is the correct one.


http://www.w3.org/International/O-HTTP-charset


2011/2/9 Siegel Andreas andreas.sie...@vorarlberg.at

  Hi Tom.

 Thanks for your reply. But no, it is not an issue with ArcGIS.
 The link you sent me may prove useful anyway since we rely heavy on
 shapefiles and ArcGIS ist used by several of our colleges and contributors.

 My issue is this line of code:
 meta http-equiv=Content-Type content=text/html;
 charset=MacThai/meta
 Please note the charset MacThai.
 This charset should render my results illegible but it has no effect at
 all.

 I test it by using a browser:

 http://vogis.cnv.at/mapserver/mapserv?map=a.mapLAYERS=umlauttestSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application/vnd.ogc.se_xmlFORMAT=image/jpegSRS=EPSG:31254BBOX=-49500,246750,-49000,247250X=250Y=250INFO_FORMAT=text/htmlQUERY_LAYERS=umlauttestWIDTH=650HEIGHT=650FEATURE_COUNT=30

  and the commandline.
 ./mapserv -nh
 QUERY_STRING=map=a.mapLAYERS=umlauttestSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application/vnd.ogc.se_xmlFORMAT=image/jpegSRS=EPSG:31254BBOX=-49500,246750,-49000,247250X=250Y=250INFO_FORMAT=text/htmlQUERY_LAYERS=umlauttestWIDTH=650HEIGHT=650FEATURE_COUNT=30
  The commandline output can be inspected by hexdump -C

 ./mapserv -nh
 QUERY_STRING=map=a.mapLAYERS=umlauttestSERVICE=WMSVERSION=1.1.1REQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application/vnd.ogc.se_xmlFORMAT=image/jpegSRS=EPSG:31254BBOX=-49500,246750,-49000,247250X=250Y=250INFO_FORMAT=text/htmlQUERY_LAYERS=umlauttestWIDTH=650HEIGHT=650FEATURE_COUNT=30
 | hexdump -c

 This allows to inspect the result without some unwanted/unnoticed code
 translations when using an editor or the browser,

 This are the HTML-Templates:
 Header:
 !-- MapServer Template --

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
 http://www.w3.org/TR/html4/transitional.dtd;

 html

 head

  !-- enforce the client to display result html as UTF-8 encoding --
  meta http-equiv=Content-Type content=text/html;
 charset=MacThai/meta

  style type=text/css

   table, th, td {
border:1px solid #e5e5e5;
border-collapse:collapse;
font-family: arial;
font-size: 80%;
color: #33
   }

   th, td {
valign: top;
text-align: center;
   }

  th {
   background-color: #aed7ff
  }

  caption {
   border:1px solid #e5e5e5;
   border-collapse:collapse;
   font-family: arial;
   font-weight: bold;
   font-size: 80%;
   text-align: left;
   color: #33;
  }

  /style
  titleGetFeatureInfo Response/title
 /head

 body
  table

   captionWidmungsart Zeichensatztest ae ä oe ö ue ü AE Ä OE Ö UE Ü
 scharfes s ß Ende/caption

  tbody
   thKuerzel/th
   thWidmungsart/th
   thFlaeche/th
   thText/th


 TEMPLATE:
  !-- MapServer Template --
  tr
td[item name=WI_EM_KN format=$value escape=none]/td
td[item name=WI_EM_TXT format=$value escape=none]/td
td[item name=Flaeche format=$value escape=none]/td
td[item name=FS_TXT  format=$value escape=none]/td
  /tr


 FOOTER:
  !-- MapServer Template --
/tbody
  /table
  br/
/body
 /html














  *Mag Andreas Siegel*
 Landesvermessungsamt Feldkirch
 Johannitergasse 6, A-6800 Feldkirch
 Tel: +43(0) 5522 / 75482 - 60227
 Fax: +43(0) 5522 / 75482 - 6
  E-Mail: 
 andreas.sie...@vorarlberg.atandreas.andreas.sandreas.sie...@vorarlberg.at
 http://www.vorarlberg.at/lva

 Rechtsverbindlichen Schriftverkehr
 (zB Anträge, Rechtsmittel) richten Sie an:
 E-Mail: landesvermessungs...@vorarlberg.at
 Fax: +43(0)5522/75482-6


 ___
 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


Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environmentwith shapfile in cp-1252

2011-02-09 Thread Rahkonen Jukka
Hi,
 
For those willing to change shapefile character encoding physically, OpenJUMP 
(www.openjump.org) is nowadays a handy tool for changing the codepages.  Just 
select the codepage to use when opening the shapefile, and similarly codepage 
to use when saving shapefile through Save Dataset As  Version 1.4.x of 
OpenJUMP is needed and codepage query must be activated first from the 
Customize - Options menu item.
 
-Jukka Rahkonen-
 
 





Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Siegel Andreas
Lähetetty: 9. helmikuuta 2011 11:20
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: RE: [mapserver-users] GetfeatureInfo-Request in an UTF-8 
environmentwith shapfile in cp-1252


Hi Tom.
 
Thanks for your reply. But no, it is not an issue with ArcGIS.
The link you sent me may prove useful anyway since we rely heavy on 
shapefiles and ArcGIS ist used by several of our colleges and contributors.
 
 

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


RE: [mapserver-users] changing dynamically LABEL BACKGROUNDCOLOR

2011-02-09 Thread tommaso
thanks Steven this was the right solution.

greetings,
Tommaso

On Tue, 2011-02-01 at 09:07 -0600, Lime, Steve D (DNR) wrote:

 Actually I just ran a test against 5.6 and found I could change a labels 
 background color via URL. Syntax is:
 
   map.layer[some_layer].class[0]=LABEL+BACKGROUNDCOLOR+255+0+0+END
 
 Steve
 
 From: tommaso [tommas...@googlemail.com]
 Sent: Monday, January 31, 2011 11:36 AM
 To: Lime, Steve D (DNR)
 Cc: mapserver-users@lists.osgeo.org
 Subject: RE: [mapserver-users] changing dynamically LABEL BACKGROUNDCOLOR
 
 Hallo Steve,
 
 I can try to hack the source (or rather I'll ask a workmate). More details 
 were welcome, thanks.
 
 Regards,
 Tommaso
 
 
 On Mon, 2011-01-31 at 10:08 -0600, Lime, Steve D (DNR) wrote:
 
 
 Been on a short holiday, where did this get left? If you can hack the source 
 it's a very simple change (I think) to maplexer.l to allow the updates you 
 need. I can provide more direction if necessary.  - Steve
 
 
 From: 
 mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
  
 [mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org]
  On Behalf Of tommaso 
 [tommas...@googlemail.commailto:tommas...@googlemail.com]
 Sent: Thursday, January 27, 2011 11:55 AM
 To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] changing dynamically LABEL BACKGROUNDCOLOR
 
 On Thu, 2011-01-27 at 16:47 +0100, Julien Cigar wrote:
 
 
 use SLD ?
 
 
 Thanks, this were a solution but I should radically change my project. I will 
 try it if there is not other ways.
 Other ideas?
 
 Tommaso
 
 
 
 
 
 
 
 



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


Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

2011-02-09 Thread Daniel Morissette

On 11-02-08 09:37 AM, Siegel Andreas wrote:

Hi.
Our mapserver-eniromnent entirely works in utf-8 (mapfiles, webserver,
postgres, ..) with one exception, that is, all of our shapefiles.
The shapfiles are created/updated in an Windows-environment by several,
external contributors.
Hence they are encoded in Wiindows-ANSI (cp: 1252).
If i do an GetFeatureInfo-Request on the attibutes of the shapefiles all
special characters (umlauts) are garbled.
This is no wonder since the content of the shapefile-attributes must be
recoded to utf-8 prior to insertion in the template.html.
How can this be acomplished? I could not find anything useful in the
documentation or with google.


The short answer is that there is no mechanism in MapServer at the 
moment to convert encoding of attributes displayed in a query template, 
so your only options are to either change the encoding of the data files 
to UTF-8, or change the template.html and its header to match the 
encoding of the data. (The only place where MapServer supports encoding 
conversion at the moment is in map labels, see the ENCODING keyword in 
the LABEL docs.)


Of course this could be a nice enhancement to MapServer if there was a 
group interested in funding it.


Daniel
--
Daniel Morissette
http://www.mapgears.com/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] GetfeatureInfo-Request in an UTF-8 environment with shapfile in cp-1252

2011-02-09 Thread Yewondwossen Assefa

On 09/02/2011 7:34 AM, Daniel Morissette wrote:

On 11-02-08 09:37 AM, Siegel Andreas wrote:

Hi.
Our mapserver-eniromnent entirely works in utf-8 (mapfiles, webserver,
postgres, ..) with one exception, that is, all of our shapefiles.
The shapfiles are created/updated in an Windows-environment by several,
external contributors.
Hence they are encoded in Wiindows-ANSI (cp: 1252).
If i do an GetFeatureInfo-Request on the attibutes of the shapefiles all
special characters (umlauts) are garbled.
This is no wonder since the content of the shapefile-attributes must be
recoded to utf-8 prior to insertion in the template.html.
How can this be acomplished? I could not find anything useful in the
documentation or with google.


The short answer is that there is no mechanism in MapServer at the 
moment to convert encoding of attributes displayed in a query 
template, so your only options are to either change the encoding of 
the data files to UTF-8, or change the template.html and its header to 
match the encoding of the data. (The only place where MapServer 
supports encoding conversion at the moment is in map labels, see the 
ENCODING keyword in the LABEL docs.)


Of course this could be a nice enhancement to MapServer if there was a 
group interested in funding it.


Daniel


Sorry to jump late on this. This issue I believe was identified and 
described in the trac bug [1]. An incomplete solutions was proposed in 
there but It definitely need more thinking.


[1] http://trac.osgeo.org/mapserver/ticket/3297

Assefa

--

Assefa Yewondwossen
Software Analyst

Email: yass...@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925



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


[mapserver-users] Projection library error - EPSG Issue

2011-02-09 Thread phil7g

Hi!

Im experiencing a problem when trying to set up a GIS with mapserver and
mepbender. First of all, this link leads to a working version of my data in
the map-mode of mapserver
http://gis-test.geomatik.rub.de/cgi-bin/mapserv?map=/srv/www/htdocs/GIS2/Studieren_in_Bochum.mapmode=map
. As soon as I want to move the data to mapbender by using a wms/wfs in
order to add a gui etc., I'm getting an error message
(msProcessProjection(): Projection library error. no system list, errno: 2).
I've no idea what's wrong here and would be very thankful for any
suggestion. Could it be a problem with the EPSG-file or the EPSG-path in the
mapfile? In mapbender, the only given choice when trying to change the
EPSG-Code for my WMS is 4326... but it should be 31466 (as you can see in
the mapfile below)... If you need more data to analyse the problem, just
tell me and I'll provide it.

Eagerly awaiting your answers,

best regards,

Phil

So long!

Here is the mapfile (as you can see, I've already tried to fix the problem.
init=epsg:31466 produced the error - msProcessProjection(): Projection
library error. no system list, errno: 2, as well):

MAP

  NAME Studieren_in_Bochum
  # Map image size
  STATUS on 
  SIZE 800 600
  UNITS meters
  EXTENT 2579969.569440 5698881.998161 2594471.381955 5705864.352335
  FONTSET ./Fonts/Fonts.txt
  SYMBOLSET ./Symbols/Symbols.txt
  SHAPEPATH ./Shapes/
  CONFIG PROJ_LIB ./EPSG/
  PROJECTION
#init=epsg:31466  
proj=tmerc
ellps=bessel
datum=potsdam
no_defs
  END

  # Background color for the map canvas -- change as desired
  IMAGECOLOR 255 255 140
  IMAGEQUALITY 95
  IMAGETYPE png


  # Legend
  LEGEND
IMAGECOLOR 255 255 255
OUTLINECOLOR 0 0 0
KEYSIZE 30 20
STATUS embed
POSITIon UR
TRANSPARENT off  
  END
  # SCALEBAR
  SCALEBAR
STATUS embed
STYLE 0
UNITS kilometers
INTERVALS 3
TRANSPARENT true
OUTLINECOLOR 0 0 0  
  END

  # Web interface definition. only the template parameter
  # is required to display a map. See MapServer documentation
  WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH ./srv/www/htdocs/maptemp/

# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL ./maptemp/

#Scale range at which web interface will operate
# Template and header/footer settings
# only the template parameter is required to display a map. See
MapServer documentation
#TEMPLATE template.html

METADATA
  #WMS
  wms_TITLE WMS Studieren in Bochum
  wms_ABSTRACT WMS Studieren in Bochum
  wms_FEATURE_INFO_MIME_TYPE text/html
  wms_onLINESOURCE
http://gis-test.geomatik.rub.de/cgi-bin/mapserv?map=/srv/www/htdocs/GIS2/Studieren_in_Bochum.map;
  wms_SRS EPSG:31466
  #WFS 
  wfs_TITLE WFS Studieren in Bochum
  wfs_ABSTRACT WFS Studieren in Bochum
  wfs_onLINESOURCE
http://gis-test.geomatik.rub.de/cgi-bin/mapserv?map=/srv/www/htdocs/GIS2/Studieren_in_Bochum.map;
  wfs_SRS EPSG:31466
END
  END

  LAYER
NAME OePNVLinien
TYPE LINE
DUMP true
  EXTENT 2579969.569440 5698881.998161 2594471.381955 5705864.352335
DATA OePNVLinien.shp
METADATA
  wms_title OePNVLinien
  wfs_title OePNVLinien
  wfs_featureid Linie
  gml_include_items all
END
#MINSCALEDENOM 1 
#MAXSCALEDENOM 10
STATUS default
TRANSPARENCY 100
#PROJECTION
#proj=longlat
#ellps=WGS84
#datum=WGS84
#no_defs
#END
CLASS
   NAME OePNV-Linien 
   STYLE
 WIDTH 2 
 COLOR 255 0 0
   END
END
  END

  LAYER
NAME Studentenwohnheime
TYPE POINT
DUMP true
  EXTENT 2579969.569440 5698881.998161 2594471.381955 5705864.352335
DATA Studentenwohnheime.shp
METADATA
  wms_title Studentenwohnheime
  wfs_title Studentenwohnheime
  wfs_featureid Point_ID
  gml_include_items all 
END
#MINSCALEDENOM 1 
#MAXSCALEDENOM 10
STATUS default
TRANSPARENCY 100
#PROJECTION
#proj=longlat
#ellps=WGS84
#datum=WGS84
#no_defs
#END
CLASS
   NAME Studentenwohnheime 
   STYLE
 SYMBOL Studentenwohnheime
 MAXSIZE 10
   END
END
  END

  LAYER
NAME Sport_und_Freizeit
TYPE POINT
DUMP true
  EXTENT 2579969.569440 5698881.998161 2594471.381955 5705864.352335
DATA Sport_und_Freizeit.shp
METADATA
  wms_title Sport_und_Freizeit
  wfs_title Sport_und_Freizeit
  wfs_featureid Linie
  gml_include_items all
END
#MINSCALEDENOM 1 
#MAXSCALEDENOM 10
STATUS default
TRANSPARENCY 100
#PROJECTION
#proj=longlat
#ellps=WGS84
#datum=WGS84
#no_defs
#END
CLASS
   NAME Sport und Freizeit 
   STYLE
 SYMBOL Sport_und_Freizeit 
 MAXSIZE 10
   END
END
  END

  LAYER
NAME OePNVHaltestellen

Re: [mapserver-users] Projection library error - EPSG Issue

2011-02-09 Thread Frank Warmerdam

On 11-02-09 08:56 AM, phil7g wrote:


Hi!

Im experiencing a problem when trying to set up a GIS with mapserver and
mepbender. First of all, this link leads to a working version of my data in
the map-mode of mapserver
http://gis-test.geomatik.rub.de/cgi-bin/mapserv?map=/srv/www/htdocs/GIS2/Studieren_in_Bochum.mapmode=map
. As soon as I want to move the data to mapbender by using a wms/wfs in
order to add a gui etc., I'm getting an error message
(msProcessProjection(): Projection library error. no system list, errno: 2).
I've no idea what's wrong here and would be very thankful for any
suggestion. Could it be a problem with the EPSG-file or the EPSG-path in the
mapfile? In mapbender, the only given choice when trying to change the
EPSG-Code for my WMS is 4326... but it should be 31466 (as you can see in
the mapfile below)... If you need more data to analyse the problem, just
tell me and I'll provide it.

Eagerly awaiting your answers,

best regards,

Phil

So long!

Here is the mapfile (as you can see, I've already tried to fix the problem.
init=epsg:31466 produced the error - msProcessProjection(): Projection
library error. no system list, errno: 2, as well):


Phil,

First, could you confirm that /usr/share/proj/epsg (or possibly
/usr/local/share/proj/epsg) has a definition for 31466?

Second, if you enable PROJ.4 level debugging you can get output on
where the epsg init file is being searched for.  I would normally try
this by setting the PROJ_DEBUG environment variable to any value (ie. on)
and then running the request at the commandline.  PROJ.4 will write some
debug output to stderr.  If you can't easily do things at the commandline
set the environment variable in your mapserv wrapper script or in the
apache config file, and then inspect the apache error log.

eg.

warmerda@gdal65[214]% setenv PROJ_DEBUG ON
warmerda@gdal65[215]% proj +init=epsg:31466
pj_open_lib(epsg): call fopen(/home/warmerda/bld/share/proj/epsg) - succeeded


If the epsg init file is not properly being found, consider setting
the global PROJ_LIB environment variable to point to the directory
where it is, or move it to the directory PROJ.4 is looking in.

If you lack the definition add this to your epsg init file:

# DHDN / 3-degree Gauss-Kruger zone 2
31466 +proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=250 +y_0=0 +ellps=bessel 
+towgs84=582,105,414,1.04,0.35,-3.08,8.3 +units=m +no_defs  


(note from 31466 to  is all one line)

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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