RE: [mapserver-users] hiow can i convert mapinfo workspace to mapserver mapfile?

2009-04-06 Thread meenu

hi friend i did this method and succeeded...i am facing one problem for 
allocating font and symbol set from mapinfo...in mapinfo i didnt findout any 
folder which is containing fonts.txt and  shade.sym...how can i solve this 
problem?

FONTSET ..\etc\fonts.txt
SYMBOLSET ..\etc\shade.sym




-
Meenu
-- 
View this message in context: 
http://n2.nabble.com/hiow-can-i-convert-mapinfo-workspace-to-mapserver-mapfile--tp2591481p2591585.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] hiow can i convert mapinfo workspace to mapserver mapfile?

2009-04-06 Thread meenu

hi friend i did this method and succeeded...i am facing one problem for 
allocating font and symbol set from mapinfo...in mapinfo i didnt findout any 
folder which is containing fonts.txt and  shade.sym...how can i solve this 
problem? 

FONTSET ..\etc\fonts.txt 
SYMBOLSET ..\etc\shade.sym 


-
Meenu
-- 
View this message in context: 
http://n2.nabble.com/hiow-can-i-convert-mapinfo-workspace-to-mapserver-mapfile--tp2591481p2591594.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] Query Unique Values in Mapfile?

2009-04-06 Thread Stefan Schwarzer

Hi there,

is it possible to make mapserver directly detect the unique values  
in a field of the dbf table? I have twenty or more point and polygon  
shapefiles, each having a column with specific thematic data, such as  
the protected area category. But the content of these columns is  
different. So, defining these classes by hand would consume much time;  
and defining them dynamically via PHP  SQL, then writing a bit of the  
mapfile code before launching the whole thing looks a little bit  
complicated for a relative basic request.


Thanks for any hints,

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


RE: [mapserver-users] hiow can i convert mapinfo workspace to mapserver mapfile?

2009-04-06 Thread Venkat Rao Tammineni
Hi 

FONTSET ..\etc\fonts.txt and SYMBOLSET ..\etc\shade.sym are file formats
that you need write in separate. Go through the mapserver url check symbols
and fonts .you will get good from there only.


Thanks
Venkat.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of meenu
Sent: Monday, April 06, 2009 12:26 PM
To: mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] hiow can i convert mapinfo workspace to
mapserver mapfile?


hi friend i did this method and succeeded...i am facing one problem for
allocating font and symbol set from mapinfo...in mapinfo i didnt findout any
folder which is containing fonts.txt and  shade.sym...how can i solve this
problem?

FONTSET ..\etc\fonts.txt
SYMBOLSET ..\etc\shade.sym




-
Meenu
-- 
View this message in context:
http://n2.nabble.com/hiow-can-i-convert-mapinfo-workspace-to-mapserver-mapfi
le--tp2591481p2591585.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


Re:[mapserver-users] visibility of the layer based on zoom extends

2009-04-06 Thread enri
Hi,

I suggest you use MSCompanion to edit your mapfile, it's easy to understand how 
to control layers and their properties.

Enri.




在2009-04-05,meenu meenu.m...@gmail.com 写道:

hi can anybody help to set the visibility of a layer based on zoom 
extends..the mapscript for the particular layer i added here as follows...

LAYER
   NAME n_towns
   TYPE POINT
   CONNECTIONTYPE OGR
   CONNECTION n_towns.TAB
   STATUS ON
   LABELITEM NAME
   CLASS
  SIZE 10
STYLE
  COLOR 100 100 100
  OUTLINECOLOR 0 0 0
  SYMBOL circle
   END
   LABEL
   COLOR 100 100 100
   FONT arial
   TYPE TRUETYPE
   SIZE 7
   POSITION LC
   WRAP  
   END
   END
END

-- 
View this message in context: 
http://n2.nabble.com/visibility-of-the-layer-based-on-zoom-extends-tp2588503p2588503.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


[mapserver-users] Layer Object Parameter Substitution from URL using GIS

2009-04-06 Thread Heiko Schröter
Hello,

when passing a 'FILTER' parameter to be changed with the URL to use GIS 
requests, mapserv(5.0.3) fails with:
loadLayer(): Unknown identifier. Parsing error near (FILTER):(line 1)

The call is:

http://localhost/cgi-bin/mapserv?MAP=/MapServer/country98/heiko1.map;
LAYERS=karte,grid,pscSERVICE=WMSVERSION=1.1.1REQUEST=GetMap
STYLES=EXCEPTIONS=application/vnd.ogc.se_inimage
FORMAT=image/png
SRS=epsg:4326BBOX=-180,7.91,-82.08,105.83
WIDTH=256HEIGHT=256
MAP.LAYER[psc].FILTER='wert=0'
(Linebreaks included for readability)

When omitting this part:  MAP.LAYER[psc].FILTER='wert=0'the map is 
generated fine (without the proper GIS data of course).

I did read several comments in the archive and the net about this issue but 
haven't found a solution to this problem.
What do i miss here ?

Thanks and Regards
Heiko


The Mapfile:
MAP
NAME WELT
DEBUG ON
STATUS ON
#SIZE 647 320
SIZE 800 400
IMAGETYPE PNG24
IMAGECOLOR 240 240 240
SHAPEPATH data
EXTENT -180 -90 180 90
UNITS DD
WEB
IMAGEPATH images
IMAGEURL images
MINSCALE 5
MAXSCALE 4
METADATA
wms_title Example WMS Server
wms_onlineresource  
http://localhost/cgi-bin/mapserv?map=heiko.map;
wms_srs epsg:4326 epsg:32661 epsg:32761
END
END
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END
SYMBOL
NAME 'star'
TYPE VECTOR
FILLED TRUE
POINTS
  0 .375
  .35 .375
  .5 0
  .65 .375
  1 .375
  .75 .625
  .875 1
  .5 .75
  .125 1
  .25 .625
END
END
PROJECTION
init=epsg:4326
END
LAYER
NAME karte
TYPE POLYGON
STATUS ON
OPACITY 50
DATA cntry98
METADATA
  wms_title karte layer
  DESCRIPTION Grid
END
PROJECTION
init=epsg:4326
END
CLASS
NAME karte_color
OUTLINECOLOR 60 60 60
COLOR 100 100 100
SYMBOL 0
END
END
LAYER
   NAME grid
   OPACITY 60
   METADATA
wms_title grid layer
DESCRIPTION Grid
   END
   TYPE LINE
   STATUS ON
   PROJECTION
init=epsg:4326
   END
   CLASS
NAME Graticule
COLOR 0 0 0
# Labels comented out for readabilty in the moment
#   LABEL
#   COLOR 0 0 0
#   #FONT fritqat
#   #TYPE truetype
#MINDISTANCE 1000
#   SIZE SMALL
#   POSITION LR
#   PARTIALS FALSE
#   BUFFER 5
#   OUTLINECOLOR 200 200 200
#   END
   END
   GRID
LABELFORMAT DD
# LABELFORMAT '%g°' # dec degrees with symbol
# MINARCS 1
MAXARCS 1
MININTERVAL 30
MAXINTERVAL 60
# MINSUBDIVIDE 100
MAXSUBDIVIDE 300
# LABELFORMAT ’%7.0f m’ # nice if a projected SRS used
# MININTERVAL 2
# MAXSUBDIVIDE 2
   END
END # Layer

LAYER
NAME psc
CONNECTIONTYPE POSTGIS
OPACITY 80
STATUS ON
METADATA
wms_title psc layer
END
PROJECTION
init=epsg:4326
END
CONNECTION user=fum password=xyz dbname=foo host=localhost
DATA geocenter from scia_psc
FILTER wert=1
TYPE POINT
CLASS
COLOR 250 10 10
SYMBOL circle
SIZE 7
END
END
LAYER
CONNECTIONTYPE POSTGIS
NAME nlc
OPACITY 80
STATUS ON
METADATA
wms_title nlc layer
END
PROJECTION
init=epsg:4326
END
CONNECTION user=fum password=xyz dbname=foo 

[mapserver-users] displaying LINESTRING elements from shapefiles

2009-04-06 Thread Adrian Popa

Hello everybody,

I'm trying to display a map generated from openstreetmaps and saved as 
several shapefile layers. The map was obtained from: 
http://download.geofabrik.de/osm/europe/

The shapefile roads.shp has a data type of LINESTRING:

[r...@alarms romania-osm-shp]# ogrinfo -al roads.shp | head -30
INFO: Open of `roads.shp'
 using driver `ESRI Shapefile' successful.

Layer name: roads
Geometry: Line String
Feature Count: 51469
Extent: (20.379788, 43.653826) - (29.712869, 48.221387)
Layer SRS WKT:
GEOGCS[GCS_WGS_1984,
   DATUM[WGS_1984,
   SPHEROID[WGS_1984,6378137,298.257223563]],
   PRIMEM[Greenwich,0],
   UNIT[Degree,0.017453292519943295]]
osm_id: Real (16.0)
name: String (32.0)
type: String (16.0)
oneway: Integer (1.0)
OGRFeature(roads):0
 osm_id (Real) = 1349
 name (String) = Bulevardul Mircea Eliade
 type (String) = tertiary
 oneway (Integer) = 0
 LINESTRING (26.0931117 44.4696734,26.09368389998 
44.46912489997,26.0940642 44.4685717,26.0961094 
44.46564860002)


I've tried creating the MAP file with a layer type of 
LINE/LINESTRING/POLYGON, but the map would not display the layer 
(however mapserver would generate an image).


My version of mapserver is 4.10.3 (fedora core 8).

My question is: can I display this data type directly with mapserver, or 
do I need to convert it to something else? Is my version of mapserver 
too old to display this data?


Thanks.

Adrian

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


Re: [mapserver-users] displaying LINESTRING elements from shapefiles

2009-04-06 Thread Rahkonen Jukka
Hi,

This layer shows OSM roads for me from the same shapefiles that you are
trying to use. 

LAYER
NAME OSM_roads
STATUS ON
DATA d:\Data\OSM\roads
TYPE LINE
UNITS METERS
METADATA
  wms_titleOSM_tiet
END
CLASS
NAME roads
OUTLINECOLOR 0 255 0
END
PROJECTION
  init=epsg:4326 
END
  END

Check that EXTENT in your mapfile suits the data.

-Jukka Rahkonen-
 

Adrian Popa wrote:

 Hello everybody,
 
 I'm trying to display a map generated from openstreetmaps and 
 saved as several shapefile layers. The map was obtained from: 
 http://download.geofabrik.de/osm/europe/
 The shapefile roads.shp has a data type of LINESTRING:
 
 [r...@alarms romania-osm-shp]# ogrinfo -al roads.shp | head -30
 INFO: Open of `roads.shp'
   using driver `ESRI Shapefile' successful.
 
 Layer name: roads
 Geometry: Line String
 Feature Count: 51469
 Extent: (20.379788, 43.653826) - (29.712869, 48.221387) Layer SRS WKT:
 GEOGCS[GCS_WGS_1984,
 DATUM[WGS_1984,
 SPHEROID[WGS_1984,6378137,298.257223563]],
 PRIMEM[Greenwich,0],
 UNIT[Degree,0.017453292519943295]]
 osm_id: Real (16.0)
 name: String (32.0)
 type: String (16.0)
 oneway: Integer (1.0)
 OGRFeature(roads):0
   osm_id (Real) = 1349
   name (String) = Bulevardul Mircea Eliade
   type (String) = tertiary
   oneway (Integer) = 0
   LINESTRING (26.0931117 44.4696734,26.09368389998
 44.46912489997,26.0940642 44.4685717,26.0961094
 44.46564860002)
 
 I've tried creating the MAP file with a layer type of 
 LINE/LINESTRING/POLYGON, but the map would not display the 
 layer (however mapserver would generate an image).
 
 My version of mapserver is 4.10.3 (fedora core 8).
 
 My question is: can I display this data type directly with 
 mapserver, or do I need to convert it to something else? Is 
 my version of mapserver too old to display this data?
 
 Thanks.
 
 Adrian
 
 ___
 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] When or if OGR can support ESRI file geodatabase?

2009-04-06 Thread Tamas Szekeres
George,

Did you mean ESRI Personal GeoDatabase?
Refer to http://www.gdal.org/ogr/drv_pgeo.html  in this topic.

Best regards,

Tamas


2009/4/6 McCown, George george.mcc...@jjg.com

  Hey All!



 Does anyone have the scoop on whether OGR will be supporting ESRI file
 geodatabase’s?



 *George McCown*
 GIS Analyst 1

 *george.mccownjjg.com*

 678.333.0228 (Direct)
 678-333-0826 (Fax)
 Jordan, Jones  Goulding
 6801 Governors Lake Parkway, Building 200
 Norcross, Ga 30071

 www.jjg.com



 This email and any files transmitted with it are intended solely for the
 use of the individual and/or entity to whom it is addressed. Unless noted
 otherwise above, any distribution or copying of this email is strictly
 prohibited. This email IS NOT a binding agreement on behalf of JJG. If you
 have received this message in error, please immediately notify the sender
 and delete this message from your computer.
 Jordan, Jones and Goulding, Inc., 6801 Governors Lake Pkwy, Norcross, Ga.
 30071 www.jjg.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


RE: [mapserver-users] When or if OGR can support ESRI file geodatabase?

2009-04-06 Thread Fawcett, David
Doubtful.  I am guessing that he is referring to their newer file
geodatabase.
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Types_of_g
eodatabases
 
The format is proprietary, but ESRI keeps saying that their intention is
to open it.  The latest info from them is that it will be available at
version 9.4.  I am guessing that this is a strategic decision rather
than a technical one.  
 
Of course, I have seen at least one ESRI File Geodatabase Team member on
the FWTools list (on an unrelated topic)...  
 
David.
-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tamas
Szekeres
Sent: Monday, April 06, 2009 9:07 AM
To: McCown, George
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] When or if OGR can support ESRI file
geodatabase?



George,

Did you mean ESRI Personal GeoDatabase?
Refer to http://www.gdal.org/ogr/drv_pgeo.html  in this topic.

Best regards,

Tamas



2009/4/6 McCown, George george.mcc...@jjg.com


Hey All!

 

Does anyone have the scoop on whether OGR will be
supporting ESRI file geodatabase's? 

 

George McCown
GIS Analyst 1

george.mccownjjg.com

678.333.0228 (Direct)
678-333-0826 (Fax)
Jordan, Jones  Goulding 
6801 Governors Lake Parkway, Building 200
Norcross, Ga 30071 

www.jjg.com http://www.jjg.com 

 

This email and any files transmitted with it are
intended solely for the use of the individual and/or entity to whom it
is addressed. Unless noted otherwise above, any distribution or copying
of this email is strictly prohibited. This email IS NOT a binding
agreement on behalf of JJG. If you have received this message in error,
please immediately notify the sender and delete this message from your
computer. 
Jordan, Jones and Goulding, Inc., 6801 Governors Lake
Pkwy, Norcross, Ga. 30071 www.jjg.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


Re: [mapserver-users] setFilter problem (c#)

2009-04-06 Thread Paul james
Hi Tamas!
It´s a Postgis layer...And the extent is fine...
Any ideia?

Thanks

On Sat, Apr 4, 2009 at 3:52 PM, Tamas Szekeres szeker...@gmail.com wrote:

 Paul,

 Which data source are you using? It highly depends on the type of the data
 source how the filter is interpreted by mapserver.
 Are you sure there are matching features within the extent you have?

 Best regards,

 Tamas



 2009/4/3 Paul james paulj...@gmail.com

 Hello guys...
 I got a problem...
 My code :

 
 var _filter = ('[gid]'='10');
 var _layer = _map.MapObj.getLayerByName(X);

 var _lC = _layer.clone();
 _lC.setFilter(_filter);
 _lC.name = Dummy;
 _lC.status = 1;
 _lC.getClass(0).getStyle(0).color.setRGB(0, 250, 250);
 _lC.getClass(0).getStyle(0).outlinecolor.setRGB(0, 250, 0);
 _map.MapObj.insertLayer(_lC, _map.MapObj.numlayers-1);
 
 -

 No error, but the filter layer doest appear... If I took of the filter
 line, the layer shows up ok...

 Any idea?

 []´s

 ___
 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] PHP mapscript and getResult()

2009-04-06 Thread Worth Lutz
There is a SWIG mapscript reference to a layerObj method getResults()
returning a resultCacheObj.  The resultCacheObj has an attribute bounds
which is the extent of the results.

Is this available in PHP mapscript.  It seems to be missing.

Worth



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


[mapserver-users] [announce] Mapfish Studio: online mapfile editor

2009-04-06 Thread Thomas Bonfort
Hi all,

CampToCamp is proud to announce the beta release of the Mapfile Editor
of Mapfish Studio.

You can demo it here http://dev.mapfish.org/studio/demo after having
registered on the site (a username and password will suffice), and/or
view a screencast of some of the functionality here
http://www.screencast.com/t/BUvqUEMZ .

Please post any feedback as to usability issues or bugs (note however
that your account on the studio site can be cleared every so often as
we upgrade versions - in that case just recreate a new account).

Features:
 * add, remove or reorder layers from data stored on the server or on
a postgis database.
 * thematic mapping (automatic classification of layer data, and/or
access to mapserver's expression filtering)
 * advanced symbology (stroke, fill, pattern, marker symbols, labelling)
 * (near) live preview - the mapfile is by default ready for WMS
 * configure a layer for WFS response (select which attributes to
return, and eventually rename them)

Note that the application is currently only available as a demo. We
will provide detailed installation instructions in a second phase once
we're ready for a wider audience. The code will be released under an
open source license (yet to be decided)

We are currently working on extending the capabilities of Studio and
the goal is to offer three main components:
- A tool to manage the data sources
- A tool to manage and edit MapFiles (the current demo)
- A tool to generate MapFish sites, with view, edit, search and query
capabilities.


( For the adventurous, an up-to-date version of the installation
instructions can be found http://dev.mapfish.org/studio/docs in a
couple of hours )

Best regards,

-- 
www.camptocamp.com
+33 4 79 26 57 97
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] setFilter problem (c#)

2009-04-06 Thread Paul james
Thanks Tamas...
I found the problem...

The correct filter to postgis is :

(gid='10')

On Mon, Apr 6, 2009 at 12:11 PM, Tamas Szekeres szeker...@gmail.com wrote:

 Then the filter is passed directly to the database in the SQL WHERE clause.
 You might want to enable logging the SQL statements at the server and see
 what gets executed when the layer is drawn.

 Best regards,

 Tamas



 2009/4/6 Paul james paulj...@gmail.com

 Hi Tamas!
 It´s a Postgis layer...And the extent is fine...
 Any ideia?

 Thanks


 On Sat, Apr 4, 2009 at 3:52 PM, Tamas Szekeres szeker...@gmail.comwrote:

 Paul,

 Which data source are you using? It highly depends on the type of the
 data source how the filter is interpreted by mapserver.
 Are you sure there are matching features within the extent you have?

 Best regards,

 Tamas



 2009/4/3 Paul james paulj...@gmail.com

  Hello guys...
 I got a problem...
 My code :

 
 var _filter = ('[gid]'='10');
 var _layer = _map.MapObj.getLayerByName(X);

 var _lC = _layer.clone();
 _lC.setFilter(_filter);
 _lC.name = Dummy;
 _lC.status = 1;
 _lC.getClass(0).getStyle(0).color.setRGB(0, 250, 250);
 _lC.getClass(0).getStyle(0).outlinecolor.setRGB(0, 250, 0);
 _map.MapObj.insertLayer(_lC, _map.MapObj.numlayers-1);
 
 -

 No error, but the filter layer doest appear... If I took of the filter
 line, the layer shows up ok...

 Any idea?

 []´s

 ___
 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] GIF format from legend mode

2009-04-06 Thread Alexander Petkov
How can I get the legend graphic of a layer in gif format (rather than
PNG) using legend mode? WMS getLegendGraphic seems to do the trick
with format=image/gif and I  am wondering if I can achieve the same in
legend mode. I tried with FORMAT=image/gif, as well as a few other
variation, but the result is always a PNG graphic,

Thanks in advance,
Alex
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP mapscript and getResult()

2009-04-06 Thread Yewondwossen Assefa


Worth Lutz wrote:

There is a SWIG mapscript reference to a layerObj method getResults()
returning a resultCacheObj.  The resultCacheObj has an attribute bounds
which is the extent of the results.

Is this available in PHP mapscript.  It seems to be missing.



It is missing in php mapscript. Added a ticket on it and It should be 
available for the 5.4.1 release:

http://trac.osgeo.org/mapserver/ticket/2967

Best Regards



Worth



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




--

Assefa Yewondwossen
Software Analyst

Email: ass...@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


Re: [mapserver-users] Layer Object Parameter Substitution from URLusing GIS

2009-04-06 Thread Steve Lime
You'll need to use 5.4 to get this functionality. That version add
support to allow you to define
validation strings to lock down what values can be passed for the
variable. Another solution is
to consider using runtime substitution to do something similar. That
works well if the SQL is
pretty much fixed:

 FILTER 'wert=%myval%'

It's also easier to secure.

Steve

 On 4/6/2009 at 4:01 AM, in message
200904061101.54781.schro...@iup.physik.uni-bremen.de, Heiko Schröter
schro...@iup.physik.uni-bremen.de wrote:
 Hello,
 
 when passing a 'FILTER' parameter to be changed with the URL to use
GIS 
 requests, mapserv(5.0.3) fails with:
 loadLayer(): Unknown identifier. Parsing error near (FILTER):(line
1)
 
 The call is:
 
 http://localhost/cgi-bin/mapserv?MAP=/MapServer/country98/heiko1.map;

 LAYERS=karte,grid,pscSERVICE=WMSVERSION=1.1.1REQUEST=GetMap
 STYLES=EXCEPTIONS=application/vnd.ogc.se_inimage
 FORMAT=image/png
 SRS=epsg:4326BBOX=-180,7.91,-82.08,105.83
 WIDTH=256HEIGHT=256
 MAP.LAYER[psc].FILTER='wert=0'
 (Linebreaks included for readability)
 
 When omitting this part:  MAP.LAYER[psc].FILTER='wert=0'the map
is 
 generated fine (without the proper GIS data of course).
 
 I did read several comments in the archive and the net about this
issue but 
 haven't found a solution to this problem.
 What do i miss here ?
 
 Thanks and Regards
 Heiko
 
 
 The Mapfile:
 MAP
   NAME WELT
 DEBUG ON
   STATUS ON
   #SIZE 647 320
 SIZE 800 400
   IMAGETYPE PNG24
   IMAGECOLOR 240 240 240
   SHAPEPATH data
 EXTENT -180 -90 180 90
   UNITS DD
   WEB
   IMAGEPATH images
   IMAGEURL images
   MINSCALE 5
   MAXSCALE 4
   METADATA
   wms_title Example WMS Server
   wms_onlineresource 
http://localhost/cgi-bin/mapserv?map=heiko.map;
   wms_srs epsg:4326 epsg:32661 epsg:32761
   END
   END
   SYMBOL
   NAME 'circle'
   TYPE ELLIPSE
   POINTS 1 1 END
   FILLED TRUE
   END
   SYMBOL
   NAME 'star'
   TYPE VECTOR
   FILLED TRUE
   POINTS
 0 .375
 .35 .375
 .5 0
 .65 .375
 1 .375
 .75 .625
 .875 1
 .5 .75
 .125 1
 .25 .625
   END
   END
   PROJECTION
   init=epsg:4326
   END
   LAYER
   NAME karte
   TYPE POLYGON
   STATUS ON
 OPACITY 50
   DATA cntry98
 METADATA
   wms_title karte layer
   DESCRIPTION Grid
 END
   PROJECTION
   init=epsg:4326
   END
   CLASS
   NAME karte_color
   OUTLINECOLOR 60 60 60
   COLOR 100 100 100
   SYMBOL 0
   END
   END
   LAYER
  NAME grid
  OPACITY 60
  METADATA
   wms_title grid layer
   DESCRIPTION Grid
  END
  TYPE LINE
  STATUS ON
  PROJECTION
   init=epsg:4326
  END
  CLASS
   NAME Graticule
   COLOR 0 0 0
 # Labels comented out for readabilty in the moment
 # LABEL
 # COLOR 0 0 0
 # #FONT fritqat
 # #TYPE truetype
 #MINDISTANCE 1000
 # SIZE SMALL
 # POSITION LR
 # PARTIALS FALSE
 # BUFFER 5
 # OUTLINECOLOR 200 200 200
 # END
  END
  GRID
   LABELFORMAT DD
   # LABELFORMAT '%g°' # dec degrees with symbol
 # MINARCS 1
   MAXARCS 1
 MININTERVAL 30
   MAXINTERVAL 60
   # MINSUBDIVIDE 100
   MAXSUBDIVIDE 300
   # LABELFORMAT ’%7.0f m’ # nice if a projected SRS
used
   # MININTERVAL 2
   # MAXSUBDIVIDE 2
  END
   END # Layer
 
   LAYER
   NAME psc
   CONNECTIONTYPE POSTGIS
   OPACITY 80
   STATUS ON
   METADATA
   wms_title psc layer
   END
   PROJECTION
   init=epsg:4326
   END
   CONNECTION user=fum password=xyz dbname=foo
host=localhost
   DATA geocenter from scia_psc
   FILTER wert=1
   TYPE POINT
   CLASS
   COLOR 250 10 10
   SYMBOL 

[mapserver-users] getExtent(c#) with Postgis data ...

2009-04-06 Thread Paul james
Hello, It seems that getExtent (c#) is not implemented...
Any other solution to get extent of a layer using mapscript?

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


Re: [mapserver-users] getExtent(c#) with Postgis data ...

2009-04-06 Thread Tamas Szekeres
Why don't? That function have already been exposed for *layerObj* with the
following signature:

*public rectObj getExtent(void)*

Best regards,

Tamas



2009/4/6 Paul james paulj...@gmail.com

 Hello, It seems that getExtent (c#) is not implemented...
 Any other solution to get extent of a layer using mapscript?

 Paul

 ___
 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] getExtent(c#) with Postgis data ...

2009-04-06 Thread Paul james
All value from getExtent (Postgis layer) is : 3.4028234663852886E+38

Is it a bug?


On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.com wrote:

 Why don't? That function have already been exposed for *layerObj* with the
 following signature:

 *public rectObj getExtent(void)*

 Best regards,

 Tamas



 2009/4/6 Paul james paulj...@gmail.com

 Hello, It seems that getExtent (c#) is not implemented...
 Any other solution to get extent of a layer using mapscript?

 Paul

 ___
 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] getExtent(c#) with Postgis data ...

2009-04-06 Thread Tamas Szekeres
Paul,

Unfortunately this function is not implemented by the MapServer postgis
driver, you might want to use the OGR C# API (ie. ogr_csharp.dll)  for this
purpose.

Best regards,

Tamas



2009/4/6 Paul james paulj...@gmail.com

 All value from getExtent (Postgis layer) is : 3.4028234663852886E+38

 Is it a bug?



 On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote:

 Why don't? That function have already been exposed for *layerObj* with
 the following signature:

 *public rectObj getExtent(void)*

 Best regards,

 Tamas



 2009/4/6 Paul james paulj...@gmail.com

  Hello, It seems that getExtent (c#) is not implemented...
 Any other solution to get extent of a layer using mapscript?

 Paul

 ___
 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] getExtent(c#) with Postgis data ...

2009-04-06 Thread Paul james
Where can I find ogr_csharp.dll ?

Thanks Tamas!

Paul

On Mon, Apr 6, 2009 at 6:22 PM, Tamas Szekeres szeker...@gmail.com wrote:

 Paul,

 Unfortunately this function is not implemented by the MapServer postgis
 driver, you might want to use the OGR C# API (ie. ogr_csharp.dll)  for this
 purpose.


 Best regards,

 Tamas



 2009/4/6 Paul james paulj...@gmail.com

 All value from getExtent (Postgis layer) is : 3.4028234663852886E+38

 Is it a bug?



 On Mon, Apr 6, 2009 at 5:56 PM, Tamas Szekeres szeker...@gmail.comwrote:

 Why don't? That function have already been exposed for *layerObj* with
 the following signature:

 *public rectObj getExtent(void)*

 Best regards,

 Tamas



 2009/4/6 Paul james paulj...@gmail.com

  Hello, It seems that getExtent (c#) is not implemented...
 Any other solution to get extent of a layer using mapscript?

 Paul

 ___
 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] Query Unique Values in Mapfile?

2009-04-06 Thread Tamas Szekeres
I'm not aware of any support for this in MapServer, however by using
MapScript you could create script to iterate the features and add new
classes to a layer on each unique combination. Then you could save the
mapfile for further editing if required.

Best regards,

Tamas



2009/4/6 Stefan Schwarzer stefan.schwar...@grid.unep.ch

 Hi there,

 is it possible to make mapserver directly detect the unique values in a
 field of the dbf table? I have twenty or more point and polygon shapefiles,
 each having a column with specific thematic data, such as the protected
 area category. But the content of these columns is different. So, defining
 these classes by hand would consume much time; and defining them dynamically
 via PHP  SQL, then writing a bit of the mapfile code before launching the
 whole thing looks a little bit complicated for a relative basic request.

 Thanks for any hints,

 Stef
 ___
 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] label display stops abruptly

2009-04-06 Thread new2ms4w

Hello,

I've tried out both the options suggested above and none of them work.
If I use  OpenLayers.Layer.MapServer.Untiled, then this problem doesn't occur. 
But ofcourse, I want to have the cool tiling effect.

I'm using Mapserver 5.2.1 with OpenLayers. My data consists of only linear 
features. 
And the screen capture is here http://n2.nabble.com/file/n2585479/badlabel.jpg

Thanks

LABEL_NO_CLIP is so that labels aren't repeated on each tile.

what you want here is PARTIALS FALSE in each of your label blocks

--
thomas



-- 
View this message in context: 
http://n2.nabble.com/label-display-stops-abruptly-tp2585479p2597034.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] displaying LINESTRING elements from shapefiles

2009-04-06 Thread Adrian Popa

Hello,

Thanks for the example - I will look into it.

Cheers,
Adrian

Rahkonen Jukka wrote:

Hi,

This layer shows OSM roads for me from the same shapefiles that you are
trying to use. 


LAYER
NAME OSM_roads
STATUS ON
DATA d:\Data\OSM\roads
TYPE LINE
UNITS METERS
METADATA
  wms_titleOSM_tiet
END
CLASS
NAME roads
OUTLINECOLOR 0 255 0
END
PROJECTION
  init=epsg:4326 
END
  END


Check that EXTENT in your mapfile suits the data.

-Jukka Rahkonen-
 


Adrian Popa wrote:

  

Hello everybody,

I'm trying to display a map generated from openstreetmaps and 
saved as several shapefile layers. The map was obtained from: 
http://download.geofabrik.de/osm/europe/

The shapefile roads.shp has a data type of LINESTRING:

[r...@alarms romania-osm-shp]# ogrinfo -al roads.shp | head -30
INFO: Open of `roads.shp'
  using driver `ESRI Shapefile' successful.

Layer name: roads
Geometry: Line String
Feature Count: 51469
Extent: (20.379788, 43.653826) - (29.712869, 48.221387) Layer SRS WKT:
GEOGCS[GCS_WGS_1984,
DATUM[WGS_1984,
SPHEROID[WGS_1984,6378137,298.257223563]],
PRIMEM[Greenwich,0],
UNIT[Degree,0.017453292519943295]]
osm_id: Real (16.0)
name: String (32.0)
type: String (16.0)
oneway: Integer (1.0)
OGRFeature(roads):0
  osm_id (Real) = 1349
  name (String) = Bulevardul Mircea Eliade
  type (String) = tertiary
  oneway (Integer) = 0
  LINESTRING (26.0931117 44.4696734,26.09368389998
44.46912489997,26.0940642 44.4685717,26.0961094
44.46564860002)

I've tried creating the MAP file with a layer type of 
LINE/LINESTRING/POLYGON, but the map would not display the 
layer (however mapserver would generate an image).


My version of mapserver is 4.10.3 (fedora core 8).

My question is: can I display this data type directly with 
mapserver, or do I need to convert it to something else? Is 
my version of mapserver too old to display this data?


Thanks.

Adrian

___
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