Re: [mapserver-users] Georeferencing a raster without worldfile

2017-12-01 Thread Fawcett, David (MNIT)
If these are .tif files, can you write the georeference info to internal 
metadata as a way to avoid a .tfw file? 

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Trond Michelsen
Sent: Friday, December 01, 2017 10:19 AM
To: Mapserver 
Subject: [mapserver-users] Georeferencing a raster without worldfile

Hi.

I'm using mapserver 7.0.0

I have about 250.000 raster images that I want to serve through mapserver. They 
are all 1195x1550 pixels, and they all cover the exact same area (UTM33N 
-75000,645,112,800).  All images has a resolution of 1km per pixel.

I also have a worldfile that works:
--8<--
1000
0.0
0.0
-1000
-75000
800
--8<--

What I want to avoid, is to have one worldfile for each of the 250.000 files. 

I have tried to use a processing directive, like the documentation says:

--8<--
WORLDFILE=
Specifies an alternative world file (for georeferencing). If a
path only is specified, the base name of the dataset will be
appended. The suffix (.wld / .tfw / ...) can be omitted.

Example:

PROCESSING "WORLDFILE=/path/"
 or
PROCESSING "WORLDFILE=/path/file.wld"
 or
PROCESSING "WORLDFILE=/path/file"
--8<--

But adding 

PROCESSING "WORLDFILE=/path/to/my/worldfile.wld"

to my mapfile has, as far as I can tell, absolutely no effect.


The projection on the layer is defined like this:

  PROJECTION
"+init=epsg:32633"
  END


If I change that to 

  PROJECTION
"+init=epsg:32633 +units=km"
  END

My layer will turn up at 0,0,1195000,155 in EPSG:32633

In theory, if I added easting and northing to the projection definition, like 
this:

  PROJECTION
"+init=epsg:32633 +units=km +x_0=-75000 +y_0=645"
  END

It should position itself properly, but proj does not allow easting or northing 
to the UTM projections.

The documetation also states:

--8<--
wms_extent

For Rasters served through WMS, MapServer can now use the
wms_extent metadata parameter to register the image. If a .wld
file cannot be found, MapServer will then look for the wms_extent
metadata parameter and use the extents of the image and the size
of the image for georegistration.
--8<--

However, if I add 

  METADATA
"wms_extent" "-75000 645 112 800"
  END

to the layer, it has no effect.


So... What am I doing wrong? How do I get my files to show up where they're 
supposed to?


--
Trond Michelsen
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

2016-11-07 Thread Fawcett, David (MNIT)
When you create your ‘feature class’ / table in the database using ESRI tools, 
you use the config option PG_GEOMETRY.  This uses PostGIS’s geometry type 
instead of ESRI’s.

With this setup, you can read and edit the data with ESRI products, and you can 
also access the features with straight PostGIS queries.  You can then just 
create a Mapserver layer with connectiontype of POSTGIS and point it at your 
database table.  http://www.mapserver.org/input/vector/postgis.html

From: Oscar ^_^ [mailto:oscar...@gmail.com]
Sent: Friday, November 04, 2016 8:18 AM
To: Fawcett, David (MNIT) <david.fawc...@state.mn.us>
Cc: Michael Smith <michael.smith.e...@gmail.com>; Lime, Steve D (MNIT) 
<steve.l...@state.mn.us>; mapserver-users@lists.osgeo.org; Wingfield, Nathaniel 
D <n...@dcp.ufl.edu>
Subject: RE: [mapserver-users] arcgis 10.3 enterprise geodatabase


How can I Store enterprice data as pg_geometry and manage versión a in 
Mapserver?

El nov 3, 2016 2:10 PM, "Fawcett, David (MNIT)" 
<david.fawc...@state.mn.us<mailto:david.fawc...@state.mn.us>> escribió:
We do the same thing, but on PostGIS with pg_geometry.

From: mapserver-users 
[mailto:mapserver-users-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org>]
 On Behalf Of Michael Smith
Sent: Thursday, November 03, 2016 3:08 PM
To: Lime, Steve D (MNIT) 
<steve.l...@state.mn.us<mailto:steve.l...@state.mn.us>>; Oscar ^_^ 
<oscar...@gmail.com<mailto:oscar...@gmail.com>>; Wingfield, Nathaniel D 
<n...@dcp.ufl.edu<mailto:n...@dcp.ufl.edu>>
Cc: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Subject: Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

The other option, which is what we use, is to store ArcGIS 10.3 enterprise data 
as SDO_GEOMETRY native. We find no performance penalties in ArcGIS and 
performance benefits for non-esri software, such as mapserver.

Mike

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers

From: mapserver-users 
<mapserver-users-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org>>
 on behalf of "Lime, Steve D (MNIT)" 
<steve.l...@state.mn.us<mailto:steve.l...@state.mn.us>>
Date: Thursday, November 3, 2016 at 4:02 PM
To: Oscar ^_^ <oscar...@gmail.com<mailto:oscar...@gmail.com>>, "Wingfield, 
Nathaniel D" <n...@dcp.ufl.edu<mailto:n...@dcp.ufl.edu>>
Cc: "mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>" 
<mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>>
Subject: Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

If GDAL/OGR can handle the format then you’re in luck. I’d check there first…

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Oscar ^_^
Sent: Thursday, November 03, 2016 2:51 PM
To: Wingfield, Nathaniel D <n...@dcp.ufl.edu<mailto:n...@dcp.ufl.edu>>
Cc: mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
Subject: Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

I've got the same requeriment althought i can use 10.1 or 10.2 but i don't know 
how to implement these to Mapserver

Any suggestion o guide ??

2016-11-01 7:39 GMT-06:00 Wingfield, Nathaniel D 
<n...@dcp.ufl.edu<mailto:n...@dcp.ufl.edu>>:
Can MapServer consume spatial data from an ArcGIS 10.3 enterprise geodatabase? 
We are using the default SDE.ST_GEOMETRY type, on Oracle. The MapServer docs 
indicate that any support for ESRI enterprise geodatabases is based on ArcSDE, 
which was abandoned by ESRI at version 10.3, in favor of direct connect 
(https://blogs.esri.com/esri/supportcenter/2015/02/11/where-is-the-install-for-arcsde-10-3/).

We will likely use OpenLayers for a new web-based mapping app, so MapServer 
seems like a natural choice (otherwise we will have to use ArcGIS Server).
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
OSCAR
 @
^_^
 Y
___ mapserver-users mailing list 
mapserver-users@lists.osgeo.org<mailto: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] arcgis 10.3 enterprise geodatabase

2016-11-03 Thread Fawcett, David (MNIT)
We do the same thing, but on PostGIS with pg_geometry.

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Michael Smith
Sent: Thursday, November 03, 2016 3:08 PM
To: Lime, Steve D (MNIT) ; Oscar ^_^ 
; Wingfield, Nathaniel D 
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

The other option, which is what we use, is to store ArcGIS 10.3 enterprise data 
as SDO_GEOMETRY native. We find no performance penalties in ArcGIS and 
performance benefits for non-esri software, such as mapserver.

Mike

--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers

From: mapserver-users 
>
 on behalf of "Lime, Steve D (MNIT)" 
>
Date: Thursday, November 3, 2016 at 4:02 PM
To: Oscar ^_^ >, "Wingfield, 
Nathaniel D" >
Cc: "mapserver-users@lists.osgeo.org" 
>
Subject: Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

If GDAL/OGR can handle the format then you're in luck. I'd check there first...

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Oscar ^_^
Sent: Thursday, November 03, 2016 2:51 PM
To: Wingfield, Nathaniel D >
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] arcgis 10.3 enterprise geodatabase

I've got the same requeriment althought i can use 10.1 or 10.2 but i don't know 
how to implement these to Mapserver

Any suggestion o guide ??

2016-11-01 7:39 GMT-06:00 Wingfield, Nathaniel D 
>:
Can MapServer consume spatial data from an ArcGIS 10.3 enterprise geodatabase? 
We are using the default SDE.ST_GEOMETRY type, on Oracle. The MapServer docs 
indicate that any support for ESRI enterprise geodatabases is based on ArcSDE, 
which was abandoned by ESRI at version 10.3, in favor of direct connect 
(https://blogs.esri.com/esri/supportcenter/2015/02/11/where-is-the-install-for-arcsde-10-3/).

We will likely use OpenLayers for a new web-based mapping app, so MapServer 
seems like a natural choice (otherwise we will have to use ArcGIS Server).
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
OSCAR
 @
^_^
 Y
___ 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] Rendering of adjacent dashed lines

2016-06-17 Thread Fawcett, David (MNIT)
This is a pretty common case.  I run into it a lot when mapping adjacent 
counties in a US state.  As Thomas says, the solution is to process the data so 
that the shared borders are only represented by one line.  

Depending on what you are mapping, you could try using OFFSET to provide some 
separation between the lines.

David.

-Original Message-
From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of thomas bonfort
Sent: Friday, June 17, 2016 9:21 AM
To: Ziegler Stefan
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Rendering of adjacent dashed lines

Hi Stefan,
Unfortunately no. When I said "impossible" I meant it in the general case, not 
for MapServer specifically.
Regards,
--
thomas

On 17 June 2016 at 16:17, Ziegler Stefan  wrote:
> Hi Thomas
>
> Would it be possible to fund such a feature?
>
> Stefan
>
> Sent from my iPhone
>
>> On 17 Jun 2016, at 16:05, thomas bonfort  wrote:
>>
>> Stefan,
>> There is no trick/workaround for this aside from preprocessing your 
>> data to merge adjacent lines into one. In the general case what you 
>> are aiming for is impossible as your adjacent lines will have 
>> different lengths but will be using a fixed length dash pattern.
>>
>> --
>> thomas
>>
>>> On 17 June 2016 at 12:38, Ziegler Stefan  wrote:
>>> Hi
>>>
>>> I'm trying to render some lines with a pattern. This works and looks great 
>>> as long as the lines are not adjacent. When the lines share a common border 
>>> the dashed lines may look ugly since one dashed line is rendered on top of 
>>> the other rendered dashed line. I tried to add a white solid line under the 
>>> dashed line:
>>>
>>>CLASS
>>>  STYLE
>>>COLOR 255 255 255
>>>WIDTH 2
>>>LINECAP BUTT
>>>  END
>>>  STYLE
>>>COLOR 0 0 0
>>>WIDTH 2
>>>LINECAP BUTT
>>>PATTERN 20 4 2 4 2 4 END
>>>  END
>>>END
>>>
>>>
>>> But the behaviour is still the same. Is there a trick/workaround for this? 
>>> I'm using MapServer 7.0.1.
>>>
>>> Best regards
>>> Stefan Ziegler
>>>
>>>
>>>
>>> Freundliche Grüsse
>>> Stefan Ziegler
>>> Kantonsgeometer / Leiter Amt für Geoinformation
>>>
>>> Amt für Geoinformation
>>> Rötistrasse 4
>>> 4500 Solothurn
>>>
>>> Telefon +41 32 627 75 96
>>> Telefax +41 32 627 75 98
>>> stefan.zieg...@bd.so.ch
>>> http://www.so.ch
>>>
>>> ___
>>> 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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] WMS MapServer

2016-06-01 Thread Fawcett, David (MNIT)
The other common issue is when layer status is set to ON or OFF (not DEFAULT), 
and no layer is specified in the CGI/WMS request.

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Rahkonen Jukka (MML)
Sent: Tuesday, May 31, 2016 11:23 PM
To: Vogt, Robert (RCIS); mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WMS MapServer


Hi,



Usually blank images without error mean that there are no data within the BBOX. 
Check the coverage of your data and that you have projections right.



It would be very interesting to know afterwards all the steps you have followed 
with your Mapserver setup. I believe that you have spent considerable much time 
with it and that means that the Mapserver documentation may not be good enough.



You wrote once that you had problems with path

E:\rcis\web\MapServerDlls\uildselease-1800-x64inprojSHARE\proj_def.dat. Does it 
mean that you have built Mapserver by yourself on Windows?

 -Jukka Rahkonen-


Vogt, Robert wrote:

Good afternoon all,

Still working on getting MapServer up and running...

I am getting blank tiles back with a status of 200 in chrome.
I enabled DEBUG 4 in my .map file and designated an "MS_ERRORFILE", when I 
request the page an error test document is created...
However it is blank...does this mean there were no error's?

If so what is a reasonable next step to take to debug blank tiles?

-BobV


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

Re: [mapserver-users] Label not Displaying at Edge of Map Extent

2016-02-24 Thread Fawcett, David (MNIT)
Michele,

I am guessing that if you set LABEL PARTIALS to TRUE (or just comment it out), 
you will see your label.

http://mapserver.org/mapfile/label.html

David.

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Michele Toma
Sent: Tuesday, February 23, 2016 7:14 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Label not Displaying at Edge of Map Extent

Hi everyone,

I am having an issue with getting a label to display when it is near the edge 
of the map extent. From what I have seen, when I attach the style for the icon 
to the label object, the label does not display. However, if I remove the style 
for the icon from the label object, it does display. Is this an issue with 
MapServer 7 or the settings that I have used?

Version Information:
[root@Map18-03 cgi-bin]# ./mapserv -v
MapServer version 7.0.0 OUTPUT=PNG OUTPUT=JPEG 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=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Below is the map file to reproduce the issue. Please note that there are two 
layers - one without the icon style attached, and one with the icon style 
attached. The layer without the icon style attached has been turned on while 
the other is off.

==

MAP

  EXTENT -87.919802 0.00 72.177555 90.00
  SIZE 1280 720
  IMAGECOLOR 140 140 140

  SYMBOL
NAME 'Airport'
TYPE ELLIPSE
POINTS 1 1 END
FILLED true
  END

  LAYER
NAME "Label does display (no icon)"
TYPE POINT
FEATURE
POINTS
  -87.9 41.98
END
END
PROJECTION
  "proj=latlong"
  "ellps=WGS84"
END # PROJECTION
STATUS DEFAULT
CLASS
  TEXT 'Label'
  LABEL
TYPE BITMAP
SIZE 20
COLOR 255 255 255
PARTIALS FALSE
POSITION AUTO
PRIORITY 10
  END # LABEL
END # CLASS
  END # LAYER


  LAYER
NAME "Label does not display (with icon)"
TYPE POINT
FEATURE
POINTS
  -87.9 41.98
END
END
PROJECTION
  "proj=latlong"
  "ellps=WGS84"
END # PROJECTION
STATUS OFF
CLASS
  TEXT 'Label'
  LABEL
TYPE BITMAP
SIZE 20
COLOR 255 255 255
PARTIALS FALSE
POSITION AUTO
PRIORITY 10
STYLE
  SYMBOL "Airport"
  COLOR 0 255 0
  OUTLINECOLOR 0 0 0
  SIZE 20
END # STYLE
  END # LABEL
END # CLASS
  END # LAYER

END

Thank you,

Michele Toma
michele.t...@airborne.aero
www.airborne.aero

[New Small2]

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

Re: [mapserver-users] Listing mapfile dependencies

2016-01-22 Thread Fawcett, David (MNIT)
You guys are running Mapserver on a Pi?  I want to hear more about that!



From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of James Klassen
Sent: Friday, January 22, 2016 2:08 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Listing mapfile dependencies

Is there a good way to list all of the dependencies (files, URLs, database 
connections, etc.) of a mapfile?

I am trying to automate synchronizing mapfiles from our main server to 
Raspberry Pis to be used as mini-servers in the field.  To save space, I'd like 
to automatically get a list of all the files a particular mapfile depends on 
and only copy those instead of copying full directory trees which have many 
(large) unnecessary files.
It seems like a complete solution might be very complex undertaking given the 
number of places resources can be referenced from: TILEINDEX, GDAL/OGR 
connections (vrt), TEMPLATES, data generated URLs formed inside of TEMPLATES, 
database connections, files that are really multiple files (.shp, .wld), etc.

I can write something that deals with the subset of MapServer that we use, but 
was wondering if anyone had started something similar.
Jim Klassen
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Shapefile spatial index challenge

2015-10-23 Thread Fawcett, David (MNIT)
I have seen examples where for the purpose of overlay operations, someone chops 
up their large polys into smaller ones, each with an attribute that contains 
the id for the large poly.  I don’t know if that would fit your use case.

David.

From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] On 
Behalf Of Ben Madin
Sent: Friday, October 23, 2015 1:23 AM
To: Lydon Chandra
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Shapefile spatial index challenge

G’day Lydon,

I feel your pain, but there is little benefit to creating more quadrants. The 
idea (as I understand it - could be wrong) is to be able to use a (fast) 
bounding box to find the polygons to test, rather than having to test against 
every polygon using more complex algorithms.

I suppose you could consider that if you want to find out if a point is in one 
or more of your polygons, the benefit of having more index squares. You only 
have 8 polygons (I presume) so this should limit you in most cases to only 
having to compare your ‘point’ with only a couple of polygons using the more 
complex algorithms.

hth

cheers

Ben




On 2015-10-08, at 21:31 , Lydon Chandra 
>
 wrote:

Hi List,

How can we generate more quadrants for the spatial index for the Australia 
polygon below ?

Using MapServer shptree, even forcing it to go to 50 level deep, the spatial 
index does not have more quadrants.

More data and details at:
http://www.evernote.com/l/AhrYASBGtqVOkJn0BLqZkceADvOsA_UBfvY/





Kind Regards,
Don




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


--

Ben Madin

t : +61 8 6102 5535
m : +61 448 887 220
e : b...@ausvet.com.au

AusVet Animal Health Services

18/27 Market Street, Fremantle
Western Australia
AusVet's website:  http://www.ausvet.com.auFind our office: 
http://w3w.co/leader.code.frozen

This transmission is for the intended addressee only and is confidential 
information. If you have received this transmission in error, please delete it 
and notify the sender. The contents of this email are the opinion of the writer 
only and are not endorsed by AusVet Animal Health Services unless expressly 
stated otherwise. Although AusVet uses virus scanning software we do not accept 
liability for viruses or similar in any attachments. Thanks for reading. The 
average disclaimer at the bottom of an email is probably never read but 
contributes substantially to increasing the size of packet being sent through 
the internet and ultimately congestion.

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

Re: [mapserver-users] [mapserver-dev] RFC113 Chainable Compositing Filters

2015-10-05 Thread Fawcett, David (MNIT)
Like Steve said, beautiful maps.  Awesome work Thomas!

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Lime, Steve D 
(MNIT)
Sent: Friday, October 02, 2015 11:18 AM
To: thomas bonfort; MapServer Dev Mailing List; MapserverList OSGEO
Subject: Re: [mapserver-users] [mapserver-dev] RFC113 Chainable Compositing 
Filters

Beautiful maps... How'd you do the inside shading on the water bodies? Can 
these be applied to labels? --Steve

-Original Message-
From: mapserver-dev-boun...@lists.osgeo.org 
[mailto:mapserver-dev-boun...@lists.osgeo.org] On Behalf Of thomas bonfort
Sent: Friday, October 02, 2015 4:36 AM
To: MapServer Dev Mailing List ; MapserverList 
OSGEO 
Subject: [mapserver-dev] RFC113 Chainable Compositing Filters

Hi All,

I have finished implementing the chainable compositing filters that were 
architectured along with RFC113, and the code has been committed to the master 
branch. The aim of the development is essentially to enable soft shadow and 
blurring effects, although other usages can exist or could be added in the 
future.
To obtain a soft shadow effect that can be seen for example around the 
buildings on 
http://sitn.ne.ch/production/wsgi/mobile/?theme=mobile_default_ref=plan_ville_x=554942.49763489_y=200242.9936142_zoom=6_layers=
you can use

LAYER
 NAME "buildings"
 TYPE POLYGON
 COMPOSITE
  #create the shadow/blur effect by translating a blurred version of the layer
  COMPFILTER "grayscale()"
  COMPFILTER "translate(5,5)"
  COMPFILTER "blur(4)"
  OPACITY 50
 END
 COMPOSITE
  #and render the buildings themselves
  OPACITY 100
 END
 CLASS
  STYLE
COLOR 128 128 128
OUTLINECOLOR 0 0 0
WIDTH 1
   END
  END
END

The currently available filters are:
- "blur(integer)"
- "translate(integer,integer)"
- "grayscale()"
- "blacken()"
- "whiten()"

I'll add some documentation and autotests next week.

best regards,
Thomas
___
mapserver-dev mailing list
mapserver-...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
___
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] Using a variable as a CLASSITEM

2015-07-24 Thread Fawcett, David (MNIT)
Charles, 

I can't remember in which version the validation requirement was added, but 
take a look at this page:
http://mapserver.org/cgi/runsub.html

You may need to add a validation property to your layer.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Theobald, Charles
Sent: Friday, July 24, 2015 1:53 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Using a variable as a CLASSITEM

Is it still possible to use a variable for the value of CLASSITEM?  We're 
passing the field name to be used in the CLASSes  in the URL as a variable 
(%dmmethod%):

CLASSITEM  '%dmmethod%'
FILTER ('[type]'='County')
STATUS on
CLASS
  NAME 'No Drought'
  EXPRESSION ('[%dmmethod%]'='-1')
  STYLE 
COLOR   255 255 255   
OUTLINECOLOR20 20 20
  END
END  
This used to work in previous versions.  There are 6 different fields that 
could be searched, for 6 possible values.  I'd really like to avoid creating 36 
classes for each layer that uses this attribute table.  I am including dmmethod 
in a validation block in each layer trying to use this variable.  Mapserver 
version is 6.0.3

Any suggestions would be greatly appreciated.

Thank you.


Charles Theobald
NC Division of Water Resources
charles.theob...@ncdenr.gov
919-707-9136
*E-mail correspondence to and from this address may be subject to the North 
Carolina Public Records Law and may be disclosed to third parties.


___
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] URL redirection under IIS

2015-05-07 Thread Fawcett, David (MNIT)
Several times, I have done a search for how to do something in MapServer or 
PostGIS, and ended up finding one of my old posts to the list...

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff McKenna
Sent: Thursday, May 07, 2015 7:20 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] URL redirection under IIS

Bingo, I am constantly referring to my own docs written years ago, everyday :)  
Thanks James.

-jeff



On 2015-05-07 9:10 AM, James_in_Utah wrote:
 I will do that.  It might come in handy for myself when I go through 
 this in another year or two...



--
Jeff McKenna
MapServer Consulting and Training Services http://www.gatewaygeomatics.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] Newbie problem: mapfile for wgs84 based on epsg:28992

2015-03-25 Thread Fawcett, David (MNIT)
Have you tried 

http://localhost/cgi-bin/mapserv?map=eham.mapmode=maplayer= groenvoorziening



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of TallDragon
Sent: Wednesday, March 25, 2015 8:53 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Newbie problem: mapfile for wgs84 based on epsg:28992

Sorry, but after weeks of reading and trying solutions, I really need some 
help. I have a shapefile in RD New Amersfoort. I understand that there are a 
lot of problems with the conversion, however my mapserver output is empty and 
stays empty for weeks now.

Can someone please get me in the right direction for this? My map file is MAP
  NAME   EHAM
  IMAGETYPE  PNG
  EXTENT 4.70774 52.28803 4.80941 52.36267
  SIZE   1400 900
  SHAPEPATH  /var/maps/eham
  IMAGECOLOR 255 255 255

  PROJECTION
init=epsg:4326
  END

#  TRANSPARENT ON
  CONFIG MS_ERRORFILE /home/andre/log/mapserv.txt
  LAYER # Groen
NAME groenvoorziening
DATA groen
STATUS   ON
TYPE POLYGON

PROJECTION
  init=epsg:28992
END
METADATA
wms_srs EPSG:28992 EPSG:4326
END
#PROJECTION
#  proj=sterea
#  lat_0=52.156160
#  lon_0=5.387639
#  k=0.079
#  x_0=155000
#  y_0=463000
#  ellps=bessel
#  units=m
# 
towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812
#  no_defs
#END

CLASS
  NAME   GROEN
  STYLE
COLOR232 232 232
OUTLINECOLOR 32 32 32
  END
END
  END # States polygon layer ends here


END

the call to
http://localhost/cgi-bin/mapserv?map=eham.mapmode=maplayer=groen gives an 
empty map





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Newbie-problem-mapfile-for-wgs84-based-on-epsg-28992-tp5195384.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] passing parameter to a OGRVRTDataSource layer

2015-03-25 Thread Fawcett, David (MNIT)
Martin,

Have you looked at the CGI runtime substitution docs?: 
http://mapserver.org/cgi/runsub.html

Make sure that you look at the validation section near the bottom.  If the 
substitution works with CGI WMS, you will need validation.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Martin Ouellet
Sent: Wednesday, March 25, 2015 3:38 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] passing parameter to a OGRVRTDataSource layer

Hi all,
I'm using the virtual plugin of OGR to consume a web service who return CSV 
coordinates and mapserver is able to draw the points without any problems.

The connection definition in my mapfile is something like this.
CONNECTION OGRVRTDataSourceOGRVRTLayer 
name='select'SrcDataSourceCSV:/vsicurl/http://my 
server/service.php/SrcDataSourceGeometryTypewkbPoint/GeometryTypeSrcLayerselect/SrcLayerLayerSRSWGS84/LayerSRSGeometryField
 encoding='PointFromColumns' x='PHOTO_LONGITUDE' 
y='PHOTO_LATITUDE'//OGRVRTLayer/OGRVRTDataSource

I would like to pass arguments to that CONNETION string so I could build 
dynamic request.  something like this
CONNECTION OGRVRTDataSourceOGRVRTLayer 
name='select'SrcDataSourceCSV:/vsicurl/http://my 
server/service.php?param1=%PARAM1%amp;param2=%PARAM2%/SrcDataSourceGeometryTypewkbPoint/GeometryTypeSrcLayerselect/SrcLayerLayerSRSWGS84/LayerSRSGeometryField
 encoding='PointFromColumns' x='PHOTO_LONGITUDE' 
y='PHOTO_LATITUDE'//OGRVRTLayer/OGRVRTDataSource

I know the argument values (in my example PARAM1 and PARAM2) are OK because I'm 
seeing them in the error message thrown by mapserver (see below).  But 
mapserver refuse to render the points:

?xml version='1.0' encoding=UTF-8 standalone=no ?
!DOCTYPE ServiceExceptionReport SYSTEM 
http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd;
ServiceExceptionReport version=1.1.1
ServiceException
msDrawMap(): Image handling error. Failed to draw layer named 
#39;photo_ownedby_all#39;.
msOGRFileNextShape(): OGR error. Failed to find layer #39;select#39; on 
datasource #39;CSV:/vsicurl/http://my 
server/geophoto/select.php?PARAM1=40.886913500823205%2C-84.41259765625011amp;PARAM2=63.97980162961738%2C-43.587402343750284#39;.
/ServiceException
/ServiceExceptionReport

Strangely, if I copy paste this url in the browser, the web service is 
returning valid csv data:
http://myhttp://%3cmy 
server/geophoto/select.php?ll=40.886913500823205%2C-84.41259765625011amp;ur=63.97980162961738%2C-43.587402343750284
returned

PHOTO_LATITUDE,PHOTO_LONGITUDE

48.8099315451953,-77.0906915758454

48.8119226339273,-77.123176861499

48.8139039864207,-77.1556648776822

48.8158756013937,-77.1881556113468

48.8178374775437,-77.2206490494331

48.8171607148511,-77.2546364217682

48.8164732928131,-77.2886228129866

48.8157752119077,-77.3226082078249

48.815066472652,-77.356592590973

any thoughts?

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

Re: [mapserver-users] mapserver mapfile for transparancy

2015-03-05 Thread Fawcett, David (MNIT)
You can set Opacity at the layer level.

Here is the relevant part of the documentation:  
http://mapserver.org/mapfile/layer.html#opacity


From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of rishi
Sent: Thursday, March 05, 2015 12:38 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] mapserver mapfile for transparancy


hi all

i want to set transparency for colored polygons iam displaying a polygon layer 
on the google image and i want to set transparency so that background image has 
to visible in the colored polygons

i have attached my map also

my mapfile is

MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947

IMAGETYPE png

size 150 500

 TRANSPARENT on

LEGEND

STATUS EMBED

POSITION LR

TRANSPARENT TRUE

END

web

metadata

wms_srs EPSG:4326 EPSG:900913

end

end

LAYER CONNECTIONTYPE postgis
CONNECTION user=postgres password=** dbname=mpdb host=localhost port=5432 
DATA geom FROM view_villagevidyut using unique village_code_c11

STATUS Default

TYPE polygon

labelitem villname

  CLASSITEM process

  CLASS

   NAME completed

   EXPRESSION completed



   STYLE

 COLOR 0 255 0

   outlinecolor 121 188 255

  END

LABEL

SIZE 2

color 121 188 255

END

END

CLASS NAME uncompleted

 EXPRESSION uncompleted

STYLE

 COLOR 135 206 235

 outlinecolor 121 188 255

END

END

CLASS NAME plan not covered

EXPRESSION 

   STYLE

   COLOR 240 128 128



   outlinecolor 121 188 255

  END

  LABEL

SIZE 2

color 121 188 255

END

  END



PROJECTION

  init=epsg:900913

END





end







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

Re: [mapserver-users] Color temperature control (night-time viewing of maps)

2014-03-03 Thread Fawcett, David (MNIT)
Bob,

Are you thinking of preserving night vision or pumping up the blue to keep 
people more awake?

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Basques, Bob 
(CI-StPaul)
Sent: Monday, March 03, 2014 10:31 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Color temperature control (night-time viewing of 
maps)

All,

So, I've been reading up on nighttime colors for electronic display(s).  I was 
wondering if anyone has any pointers on information about applying color 
temperature corrections to displays for nighttime viewing.  I'm in need of 
providing this functionality to some night crew workers.

My first thought was to apply some sort of RGB algorithm to the mapfile color 
settings.  Then I thought maybe a middleware  processor routine (between 
MapServer and the browser) might be a better approach, or possibly using 
something in the browser . . .

I'm only looking at setting up distinct color settings at the moment.  Maybe 
3-5 ranges to start with.  I do know that some Mac hardware has some display 
monitoring for color temperature.  I would prefer to do something that could 
apply globally however.

Maybe there are Browser functions that can be applied to the problem (I haven't 
found anything specific there yet though.

Thanks

Bobb


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

Re: [mapserver-users] Σχετ: Mapserver can't read mapfile

2014-02-10 Thread Fawcett, David (MNIT)
To further diagnose this, it would be useful to see the contents of you 
mapfile.  If no errors are being thrown, it is quite possible that there is an 
issue with spatial reference systems, bounding boxes, or class expressions.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefanos 
Anastasiou
Sent: Monday, February 10, 2014 9:50 AM
To: j...@mapmedia.de; mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Σχετ: Mapserver can't read mapfile

Sorry fellows...  indeed there is a typo but in this e-mail... I checked my 
files again and they seem correct...

If I type on my browser:  
http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map   all I 
get is a blank page. The data folder has full permissions:  drwxrwxrwx

All other shapefiles are working correctly but yesterday I just added two more 
in the folder and all I get is a blank screen... (?)


Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen 
j...@mapmedia.demailto:j...@mapmedia.de έγραψε:
Hi,

please have a look at your path:
 http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map
and
 http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map

I guess the first one is correct and that's why you get the error-msg
with the 2nd one. So, what exactly is the result of the request
http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map ?
it sounds like a white image, not nothing. In this case you should check
the bboxes and srs first.

regards, Jörg

Am 10.02.2014 16:15, schrieb Stefanos Anastasiou:
 Hello!!

 I'am having my mapfile place in /home/mapdata folder whereas I also keep
 a couple of other mapfiles too.
 I'm trying to load it in the following form on the
 browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map

 and all I get is a blank page. No errors no nothing.

 Then I created an html template in order to click it from there by
 creating a simple link (and not a from) in the following hyperlink:  a
 href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map
 This link /a

 And I get the following error: msLoadMap(): Unable to access file.

 Last time this happened I was invoking Mapserver through a form but this
 time it's just a simple link.

 Why is it happening ?

 The weird thing is that all the other mapfiles that are seem to be
 working are are having the same permission settings with the
 current: -rw-r--r--

 Thanks a lot!



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


___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] Σχετ: Σχετ: Mapserver can't read mapfile

2014-02-10 Thread Fawcett, David (MNIT)
Stefanos,

It looks like you have a duplicate MAP line in there.

You are also specifying an extent that is from 5 deg west longitude to 0 deg 
longitude and from the equator to 5 deg north latitude.  Does your data fall in 
that part of the world?

David.

From: Stefanos Anastasiou [mailto:emperor_s...@yahoo.gr]
Sent: Monday, February 10, 2014 10:10 AM
To: Fawcett, David (MNIT); j...@mapmedia.de; mapserver-users@lists.osgeo.org
Subject: Σχετ: [mapserver-users] Σχετ: Mapserver can't read mapfile

Yeah sorry... I guess you're right.  This is my mapfile:

MAP
NAME Peloponisos
MAP
UNITS dd
SIZE 640 480
IMAGECOLOR 255 255 255
IMAGETYPE png
SHAPEPATH /home/mapdata/data
EXTENT -5.00 0.00 0.00 5.00

WEB
TEMPLATE '/usr/local/apache2/htdocs/pelop.html'
IMAGEPATH '/usr/local/apache2/htdocs/tmp'
IMAGEURL '/tmp/'
END

LAYER
   NAME 'geodata'
   DATA aisthitika_dash
   STATUS default
   TYPE polygon
   LABELCACHE on
   LABELITEM 'TEXTSTRING'
   CLASS
   NAME Dasi
   STYLE
  COLOR 212 192 100
   END
   LABEL
  COLOR 0 0 0
  SIZE small
   END #Label
  END #Class
END #layer
END #mapfile

Στις 6:00 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Fawcett, David (MNIT) 
david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us έγραψε:
To further diagnose this, it would be useful to see the contents of you 
mapfile.  If no errors are being thrown, it is quite possible that there is an 
issue with spatial reference systems, bounding boxes, or class expressions.

David.

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stefanos 
Anastasiou
Sent: Monday, February 10, 2014 9:50 AM
To: j...@mapmedia.demailto:j...@mapmedia.de; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Σχετ: Mapserver can't read mapfile

Sorry fellows...  indeed there is a typo but in this e-mail... I checked my 
files again and they seem correct...

If I type on my browser:  
http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map   all I 
get is a blank page. The data folder has full permissions:  drwxrwxrwx

All other shapefiles are working correctly but yesterday I just added two more 
in the folder and all I get is a blank screen... (?)


Στις 5:37 μ.μ. Δευτέρα, 10 Φεβρουαρίου 2014, ο/η Jörg Thomsen 
j...@mapmedia.demailto:j...@mapmedia.de έγραψε:
Hi,

please have a look at your path:
 http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.map
and
 http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/map

I guess the first one is correct and that's why you get the error-msg
with the 2nd one. So, what exactly is the result of the request
http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map ?
it sounds like a white image, not nothing. In this case you should check
the bboxes and srs first.

regards, Jörg

Am 10.02.2014 16:15, schrieb Stefanos Anastasiou:
 Hello!!

 I'am having my mapfile place in /home/mapdata folder whereas I also keep
 a couple of other mapfiles too.
 I'm trying to load it in the following form on the
 browser: http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop.mapmode=map

 and all I get is a blank page. No errors no nothing.

 Then I created an html template in order to click it from there by
 creating a simple link (and not a from) in the following hyperlink:  a
 href=http://127.0.0.1/cgi-bin/mapserv?map=/home/mapdata/pelop/mapmode=map
 This link /a

 And I get the following error: msLoadMap(): Unable to access file.

 Last time this happened I was invoking Mapserver through a form but this
 time it's just a simple link.

 Why is it happening ?

 The weird thing is that all the other mapfiles that are seem to be
 working are are having the same permission settings with the
 current: -rw-r--r--

 Thanks a lot!



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


___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] (no subject)

2013-10-11 Thread Fawcett, David (MNIT)
Daniel, 

If you tweak the layer to output as a map image, do you see any features on the 
map?

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Daniel Bolgheroni
Sent: Friday, October 11, 2013 1:45 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] (no subject)

Hi mapserver-users@,

I've set up a mapserver host and I'm trying to get kml format as output, to be 
used as a feed to Google Maps. I have no problems trying to get images, and 
actually,I can get a kml, but there is nothing useful in it.

I'm trying to make mapfile.map as simple as possible, to narrow down the 
problem, with just one shape.

The request I'm using is this:

http://localhost/cgi-bin/mapserv/?map=mapfile.mapmode=maplayer=mg

The mapfile.map I'm using is this:

MAP
NAME maps
STATUS ON
SIZE 1920 1080
#SYMBOLSET ../etc/symbols.txt
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH ../shp
IMAGECOLOR 127 0 255
#FONTSET ../etc/fonts.txt
#KML_INCLUDE_ITEMS true

LAYER
  NAME mg
  DATA '../shp/estado_mgPolygon.shp'
  STATUS ON
  TYPE POLYGON
  CLASS
NAME 'Minas Gerais'
STYLE
  OUTLINECOLOR 0 0 0
END # STYLE
  END # CLASS
END # LAYER

OUTPUTFORMAT
  NAME kml
  DRIVER KML
  MIMETYPE application/vnd.google-earth.kml+xml
  IMAGEMODE RGB
  EXTENSION kml
  FORMATOPTION 'ATTACHMENT=layer.kml'  #name of kml file returned
  FORMATOPTION maxfeaturestodraw=100
END
END # MAP

The 'layer.kml' I get is this:

?xml version=1.0 encoding=UTF-8?
kml xmlns=http://www.opengis.net/kml/2.2;
  Document
Style id=LayerFolder_check
  ListStyle
listItemTypecheck/listItemType
  /ListStyle
/Style
Style id=LayerFolder_checkHideChildren
  ListStyle
listItemTypecheckHideChildren/listItemType
  /ListStyle
/Style
Style id=LayerFolder_checkOffOnly
  ListStyle
listItemTypecheckOffOnly/listItemType
  /ListStyle
/Style
Style id=LayerFolder_radioFolder
  ListStyle
listItemTyperadioFolder/listItemType
  /ListStyle
/Style
namecriamaps/name
Folder
  namemg/name
  visibility1/visibility
  styleUrl#LayerFolder_check/styleUrl
/Folder
  /Document
/kml

Any hint on what I'm missing is appreciated.
Thank you.
___
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] Adding stackexchange to our support channels

2013-10-04 Thread Fawcett, David (MNIT)
+1  I think that gis.se makes sense.  It will also boost visibility to the gis 
crowd.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Umberto Nicoletti
Sent: Friday, October 04, 2013 7:21 AM
To: thomas bonfort
Cc: MapServer Dev Mailing List; MapserverList OSGEO
Subject: Re: [mapserver-users] Adding stackexchange to our support channels

+1

I already have a mapserver filter in place on 
gis.stackexchange.comhttp://gis.stackexchange.com/

So should it be gis or all stackexchange sites?
I am for gis, as it more relevant to the mapserver community and mapserver is 
already listed in the ads:

http://meta.gis.stackexchange.com/ads/display/1968

Umberto

On Fri, Oct 4, 2013 at 12:32 PM, thomas bonfort 
thomas.bonf...@gmail.commailto:thomas.bonf...@gmail.com wrote:
Hi MapServer Users and Power-Users,

As FrankW pointed out during our FOSS4G presentation, I would like to
propose that we add stackexchange as an official support channel for
MapServer. You can check and subscribe to mapserver related questions
here: http://stackexchange.com/filters/90617/mapserver

Why?

- Stackexchange questions and answers are very well referenced through
search engines, which would avoid recurring questions from being
brought up on the mailing list
- The answers get up or down-voted by the community, allowing a user
to immediately flesh out relevant information for a given question
- Asking a question on stack-exchange might help new users to seek for
help, instead of having to subscribe and post to a public mailing list
(which can be intimidating)

How?

- By referencing stackexchange in our getting help documentation section
- Most importantly, by having MapServer power users subscribe and
participate to the stackexchange questions, providing answers or
upvoting correct existing answers.

Users, is this something that you would find beneficial?
Power-users, would you be willing to participate to another support
channel, knowing that in the long run the aim is to reduce your
workload as the most common questions will answer themselves ?
PSC, should we have some kind of motion to vote and officialise this?

best regards,
Thomas
___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] configure mapfile wms for qgis

2013-10-04 Thread Fawcett, David (MNIT)
I would start with the documentation on this page:  
http://mapserver.org/ogc/wms_server.html   The documentation is pretty complete.

At the bottom of the page is a sample WMS mapfile.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Icadedt
Sent: Friday, October 04, 2013 5:06 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] configure mapfile wms for qgis

hi,
how to configure a mapfile in order
to do a wms that qgis can consume ?
Do you have example files ?
Greetings
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] GEOMTRANSFORM definition causing an error

2013-09-27 Thread Fawcett, David (MNIT)
If the GDAL on your system is compiled with Oracle support, you could use 
ogr2ogr to create a shapefile copy of your data from Oracle.  
http://www.gdal.org/ogr2ogr.html

If you want to do it with a GUI, you could probably use the QGIS.  I believe 
that QGIS 2.0 now has Oracle Spatial support out of the box.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of tday
Sent: Friday, September 27, 2013 8:16 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] GEOMTRANSFORM definition causing an error

Changing to:

GEOMTRANSFORM (buffer([shape], 0.0) 

...has the same error result.


There are a total of 5 mapserver calls to load the web page (I'm using leaflet 
in the browser). The error occurs on the very first call to mapserver from an 
ajax request which is requesting the un-buffered parcel layer (not the one with 
the GEOMTRANFORM option). The GET request URL is:

http://wfsd.visualapms.com/wfs.php?SERVICE=WFSVERSION=1.1.0REQUEST=getfeatureTYPENAME=parcelsSRSNAME=EPSG:4269OUTPUTFORMAT=jsonFILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EPARCEL_ID%3C/PropertyName%3E%3CLiteral%3E78517%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E

...and this is returned to the browser...

NetworkError: 500 Internal Server Error - 
http://wfsd.visualapms.com/wfs.php?SERVICE=WFSVERSION=1.1.0REQUEST=getfeatureTYPENAME=parcelsSRSNAME=EPSG:4269OUTPUTFORMAT=jsonFILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EPARCEL_ID%3C/PropertyName%3E%3CLiteral%3E78517%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E;

You could test the url yourself.

When debugging the ajax response, the 8102 is the line number in jQuery
1.7.1 core. Not sure why jquery is coughing there, but the request object and 
error are returned to the ajax error function.

I have not used shp2img before, I'll need to research to give you an answer for 
that.

I'll see if I can get the data in shapefile format which will require some work 
with the server admin.




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/GEOMTRANSFORM-definition-causing-an-error-tp5080269p5080554.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] GEOMTRANSFORM definition causing an error

2013-09-26 Thread Fawcett, David (MNIT)
I have no idea why you are getting an error about jquery, but is does look like 
you might be trying to apply a 150 degree buffer around your feature...

I don't know what version you are using, but from this RFC, it appears as 
though LAYER-level geomtransforms use ground coordinates:  
http://mapserver.org/development/rfc/ms-rfc-89.html

David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of tday
Sent: Thursday, September 26, 2013 12:21 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] GEOMTRANSFORM definition causing an error

Hello,

I'm trying to implement a buffer layer using layer GEOMTRANSFORM. I am adding 
this line to the second LAYER definition in the following map file:

GEOMTRANSFORM (buffer([shape], 150)) 

After adding this line, Mapserver throws an error:

Mapserver response:undefined - Status:error - Error:[Exception... Failure 
nsresult: 0x80004005 (NS_ERROR_FAILURE)  location: JS frame ::
http://[domain obscured]/assets/a4f84659/jquery.js :: .send :: line 8102 
data: no]

The second layer is exactly the same as the first layer except for the 
GEOMTRANSFORM definition.
Any ideas what the problem may be?  Thanks!


MAP
  NAMEobscured
  STATUS  ON
  SIZE912 380
  EXTENT  -180 -90 180 90
  UNITS   FEET
  IMAGECOLOR  255 255 255
  FONTSET /web/mapserver/fonts.list
  CONFIG MS_ERRORFILE stdout
  # CONFIG MS_ERRORFILE /web/mapserver/ms_error.txt
  DEBUG   5

  OUTPUTFORMAT
NAME json
DRIVER TEMPLATE
#MIMETYPE application/json; subtype=geojson
FORMATOPTION FILE=geojson.tmpl
  END

  OUTPUTFORMAT
NAME geojson
DRIVER TEMPLATE
#MIMETYPE application/json; subtype=geojson
FORMATOPTION FILE=geojson.tmpl
  END

  #
  # Web Interface
  #
  WEB
IMAGEPATH  ../out/
IMAGEURL   /out/
METADATA
# obscured
END
  END

  PROJECTION
init=epsg:4269
  END

  #
  # Layers
  #
  
  #
  # Parcels
  #
  LAYER
NAME   parcels
METADATA
  wfs_title Parcels
  wfs_srs   EPSG:4269
  gml_include_items all
  gml_featureid OBJECTID
  wfs_enable_request*
  wfs_getfeature_formatlist gml,json,geojson
  gml_COUNTRY_ID_type   Character
  gml_STATE_ID_type Character
  gml_COUNTY_ID_typeCharacter
  gml_PARCEL_ID_typeCharacter
END
TYPE   POLYGON
STATUS ON
EXTENT -180 -90 180 90
CONNECTIONTYPE oraclespatial
CONNECTION SDE/3nz0rb4rr4g1n@ArcSDE
DATA   SHAPE FROM (select OBJECTID, COUNTRY_ID, STATE_ID,
COUNTY_ID, PARCEL_ID, APP_USER_G, SHAPE from PARCEL) USING FILTER
PROJECTION
  init=epsg:4269
END
# TOLERANCEUNITS feet
# TOLERANCE 150 
CLASS
  NAME  Parcels
  STYLE
COLOR240 240 240
OUTLINECOLOR   0   0   0
  END
END
  END
  #
  # Buffered Parcels
  #
  LAYER
NAME   parcelbuffers
METADATA
  wfs_title Parcel Buffers
  wfs_srs   EPSG:4269
  gml_include_items all
  gml_featureid OBJECTID
  wfs_enable_request*
  wfs_getfeature_formatlist gml,json,geojson
  gml_COUNTRY_ID_type   Character
  gml_STATE_ID_type Character
  gml_COUNTY_ID_typeCharacter
  gml_PARCEL_ID_typeCharacter
END
TYPE   POLYGON
STATUS ON
EXTENT -180 -90 180 90
CONNECTIONTYPE oraclespatial
CONNECTION SDE/3nz0rb4rr4g1n@ArcSDE
DATA   SHAPE FROM (select OBJECTID, COUNTRY_ID, STATE_ID,
COUNTY_ID, PARCEL_ID, APP_USER_G, SHAPE from PARCEL) USING FILTER
PROJECTION
  init=epsg:4269
END
# GEOMTRANSFORM (buffer([shape], 150)) 
CLASS
  NAME  Parcel Buffers
  STYLE
COLOR240 240 240
OUTLINECOLOR   0   0   0
  END
END
  END
END



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/GEOMTRANSFORM-definition-causing-an-error-tp5080269.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] TYPE/FONT/SIZE breaks labels

2013-09-16 Thread Fawcett, David (MNIT)
You don't mention if you have a fontset file or an associated entry in your 
mapfile.

http://mapserver.org/mapfile/fontset.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Michael McInnis
Sent: Monday, September 16, 2013 12:04 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] TYPE/FONT/SIZE breaks labels

Mapservers!

I have bailed on dynamically generating labels and fell back to a .map based 
solution and may have found the primary problem. If I enable TYPE or FONT or 
SIZE in the LABEL section my map fails to display. I installed Truetype fonts 
on my Ubuntu system on Friday.

Does anyone know why the fonts will not function?

LAYER
CONNECTIONTYPE POSTGIS
NAME airports
CONNECTION host= dbname= user= password= port=
PROCESSING CLOSE_CONNECTION=DEFER
#DATA geom From airports
DATA geom From (select a.icao, geom From airports a left join 
airportdata e on a.icao = e.icao where e.icao Is Not Null) as subquery using 
unique icao using srid=4326
STATUS ON
TYPE POINT
LABELITEM icao
CLASS
LABEL
#TYPEtruetype
#FONT sans
#SIZE8
ANTIALIAS TRUE
POSITION AUTO
PARTIALS TRUE
MINDISTANCE 100
BUFFER 4
COLOR 0 0 0
END
NAME airportsClass
STYLE
SYMBOL 'circle-filled'
SIZE 3
COLOR 255 22 22
END
END # Class
END # Layer
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] TYPE/FONT/SIZE breaks labels

2013-09-16 Thread Fawcett, David (MNIT)
Make sure that the paths in your fontset file point to the font files and 
remember that the paths are probably case sensitive.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Michael McInnis
Sent: Monday, September 16, 2013 12:52 PM
To: Rahkonen Jukka; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] TYPE/FONT/SIZE breaks labels

Thanks, that seems to have fixed things. It only seems to work with arial but 
the sizes work now.

I'll look into how to get full control of installed fonts I guess.

Michael McInnis 6033 44th Ave. N.E. Seattle, WA 98115 206 517-4701
 From: jukka.rahko...@mmmtike.fimailto:jukka.rahko...@mmmtike.fi
 To: mmcinni...@msn.commailto:mmcinni...@msn.com; 
 mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
 Subject: VS: [mapserver-users] TYPE/FONT/SIZE breaks labels
 Date: Mon, 16 Sep 2013 17:09:04 +

 Hi,

 Add DEBUG 5 into your LAYER and you may see from the MS_ERRORFILE what is the 
 problem. My bet is that you are missing the FONTSET 
 http://www.mapserver.org/mapfile/fontset.html

 -Jukka Rahkonen-
 
 Michael McInnis wrote:

  Mapservers!

  I have bailed on dynamically generating labels and fell back to a .map 
  based solution and may have found the primary problem. If I enable TYPE or 
  FONT or SIZE in the LABEL section my map fails to display. I installed 
  Truetype fonts on my Ubuntu system on Friday.

  Does anyone know why the fonts will not function?

 LAYER
 CONNECTIONTYPE POSTGIS
 NAME airports
 CONNECTION host= dbname= user= password= port=
 PROCESSING CLOSE_CONNECTION=DEFER
 #DATA geom From airports
 DATA geom From (select a.icao, geom From airports a left join airportdata e 
 on a.icao = e.icao where e.icao Is Not Null) as subquery using unique icao 
 using srid=4326
 STATUS ON
 TYPE POINT
 LABELITEM icao
 CLASS
 LABEL
 #TYPE truetype
 #FONT sans
 #SIZE 8
 ANTIALIAS TRUE
 POSITION AUTO
 PARTIALS TRUE
 MINDISTANCE 100
 BUFFER 4
 COLOR 0 0 0
 END
 NAME airportsClass
 STYLE
 SYMBOL 'circle-filled'
 SIZE 3
 COLOR 255 22 22
 END
 END # Class
 END # Layer
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] problem with INTERSECTS query from OpenLayers to mapserver

2013-09-13 Thread Fawcett, David (MNIT)
Sally,

To make it easier for people to help you figure this out, I would suggest 
including the request string produced by OpenLayers and your mapfile text.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sally Buechel
Sent: Friday, September 13, 2013 1:54 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] problem with INTERSECTS query from OpenLayers to 
mapserver

Am hoping someone can help or at least point me in the right direction 
regarding a problem I'm having trying to send a spatial filter produced in 
OpenLayers to mapserver.  What I'm trying to do is so basic, I'm sure that many 
have done this, yet I've been unsuccessful.  I thought this would be easy.  
With much searching I have found similar questions, but nothing actually 
answering or showing a working example of this.

I'm using mapserver 6.2.1 and the current OpenLayers.js.  I can run the wfs.map 
file using shp2img and get a valid response from mapserver, I can run 
non-spatial filters using my OpenLayers WFS call to mapserver.  The POST 
request sent to mapserver with the spatial query looks fine, but I simply get  
the not very helpful premature end of script headers : mapserv in response.  
The spatial input is a hand-drawn polygon in OpenLayers and the intersection at 
the mapserver end is a postgis table containing a polygon field.  The table is 
large, but a spatial restriction should always yield a manageable number of 
records.  Without a spatial restriction in the filter, I've noticed that 
mapserver tried to load all the data, so have currently restricted it to 100 
records for testing/debugging.  I'm assuming once I get the spatial filter that 
this will restrict the number of records retrieved on the server side.  I have 
some assumptions, but as I said I've not been able to find a working example of 
this online, maybe because its too simple and everyone but me has it working?

Should what I'm trying to do work or am I just beating my head against the 
wall?  It doesn't seem that this should be so hard...

Sally


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

[mapserver-users] FW: problem with INTERSECTS query from OpenLayers to mapserver

2013-09-13 Thread Fawcett, David (MNIT)


From: Sally Buechel [mailto:swbuec...@comcast.net]
Sent: Friday, September 13, 2013 3:39 PM
To: Fawcett, David (MNIT)
Subject: RE: [mapserver-users] problem with INTERSECTS query from OpenLayers to 
mapserver

Here are the POST queries output by OpenLayers and the wfs part of the mapfile 
its using if that helps (am also interested in confirming just that this 
general concept works, that someone is actually doing it successfully):


Example of the POST request for a non-spatial query which works

wfs:GetFeature xmlns:wfs=http://www.opengis.net/wfs; service=WFS 
version=1.0.0 maxFeatures=50 xsi:schemaLocation=http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsdhttp://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
wfs:Query typeName=feature:mytable
ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:And
ogc:PropertyIsLessThan
ogc:PropertyNameattr2/ogc:PropertyName
ogc:Literal5/ogc:Literal
/ogc:PropertyIsLessThan
ogc:PropertyIsEqualTo
ogc:PropertyNameattr3/ogc:PropertyName
ogc:Literal78008/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:And
/ogc:Filter
/wfs:Query
/wfs:GetFeature

Example of the POST for the spatial INTERSECTS query which fails:

wfs:GetFeature xmlns:wfs=http://www.opengis.net/wfs; service=WFS 
version=1.0.0 maxFeatures=50 xsi:schemaLocation=http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsdhttp://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
wfs:Query typeName=feature:mytable
ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:And
ogc:Intersects
ogc:PropertyNameattr1/ogc:PropertyName
gml:Polygon xmlns:gml=http://www.opengis.net/gml; srsName=EPSG:4326
gml:outerBoundaryIs
gml:LinearRing
gml:coordinates decimal=. cs=, ts= -166.8375,69.723751831055 
-168.75,63.311251831055 -166.3875,60.273751831055 -160.3125,57.573751831055 
-155.5875,59.036251831055 -153.5625,62.748751831055 -156.6,66.911251831055 
-166.8375,69.723751831055/gml:coordinates
/gml:LinearRing
/gml:outerBoundaryIs
/gml:Polygon
/ogc:Intersects
ogc:PropertyIsEqualTo
ogc:PropertyNameattr2/ogc:PropertyName
ogc:Literal5/ogc:Literal
/ogc:PropertyIsEqualTo
/ogc:And
/ogc:Filter
/wfs:Query
/wfs:GetFeature

Response from failed Spatial query:

!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN
htmlhead
title500 Internal Server Error/title
/headbody
h1Internal Server Error/h1
pThe server encountered an internal error or
misconfiguration and was unable to complete
your request./p
pPlease contact the server administrator,
root@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error./p
pMore information about this error may be available
in the server error log./p
hr
addressApache Server at localhost Port 80/address
/body/html

Apache error log:
[Fri Sep 13 01:49:34 2013] [error] [client 127.0.0.1] Premature end of script 
headers: mapserv, referer: http://localhost/testol6_7w.html

WFS part of Mapfile (note this mapfile works using shp2img when a FILTER is 
added to it):

MAP

clipped out part
#
# Set up WFS layer for feeding data to OpenLayers front-end
LAYER
   NAME mytable
   TYPE Polygon
   STATUS ON
   DUMP true #added 8/13 can't remember if needed...
   CONNECTIONTYPE postgis
   CONNECTION host='localhost' dbname='test' user='user1' port=5432
   PROCESSING CLOSE_CONNECTION=DEFER
   # need geometry, doesn't work for geography trying to cast it
   # this worked for mapserver
   DATA attr1 from mytable USING UNIQUE gid USING srid=4326
   METADATA
 wfs_title   My_WFS
 wfs_version 1.0.0
 wfs_extent -180.00 -89.99 180.00 89.99
 gml_include_items all
 gml_featureid gid
 wfs_enable_request  *
   END
   CLASS
  NAME 'Attr1'
  STYLE
  COLOR -1 -1 -1
  OUTLINECOLOR 0 255 0
  END
   END # end attr1 class
   PROJECTION
   init=epsg:4326
   END
END #query layer

END #end map


From: Fawcett, David (MNIT) [mailto:david.fawc...@state.mn.us]
Sent: Friday, September 13, 2013 12:15 PM
To: Sally Buechel; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] problem with INTERSECTS query from OpenLayers to 
mapserver

Sally,

To make it easier for people to help you figure this out, I would suggest 
including the request string produced by OpenLayers and your mapfile text.

David.

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 
[mailto:mapserver-users-boun...@lists.osgeo.org]mailto:[mailto:mapserver-users-boun...@lists.osgeo.org]
 On Behalf Of Sally Buechel
Sent: Friday, September 13, 2013 1:54 PM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] problem with INTERSECTS query from OpenLayers to 
mapserver

Am hoping someone can help or at least point me in the right

Re: [mapserver-users] Projections and raster files

2013-08-29 Thread Fawcett, David (MNIT)
David,

Take a look at the map extent and units.  They should be the units used by your 
output spatial reference system.

In your current map file, you have DD for the units, for 3857, they should be 
meters.  You will also want to express your extent in 3857 coords.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of David Power
Sent: Thursday, August 29, 2013 10:01 AM
To: MapserverList OSGEO
Subject: [mapserver-users] Projections and raster files

Hello,

I have a number of geotiffs which are currently using epsg:4326 and I would 
like to output a region using epsg:3857.

I am new to mapserver but from what I have read the way achieve this is by 
setting the projection of the map to epsg:3857 and the layer to epsg:4326.

When I set the projections to the same value I get the output I expect without 
a problem, if I set the projections to different values I do not get an error 
but the output is blank.

To make life more complicated I am using mapscript via the Java swig interface, 
the version of mapserver I am using is mapserver 6.1.2.1 which I built from 
source.

If anybody has any advice I would be most grateful.

David

-

gdalinfo gives the following information about one of the files:

Driver: GTiff/GeoTIFF
Files: globcover_n10e005.tif
Size is 7200, 7200
Coordinate System is:
GEOGCS[WGS 84,
DATUM[WGS_1984,
SPHEROID[WGS 84,6378137,298.257223563,
AUTHORITY[EPSG,7030]],
AUTHORITY[EPSG,6326]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4326]]
Origin = (5.000,9.615)
Pixel Size = (0.0001389,-0.0001389)
Metadata:
  DataType=Generic
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   5.000,  10.000) (  5d 0'0.00E, 10d 0'0.00N)
Lower Left  (   5.000,   9.000) (  5d 0'0.00E,  9d 0'0.00N)
Upper Right (   6.000,  10.000) (  6d 0'0.00E, 10d 0'0.00N)
Lower Right (   6.000,   9.000) (  6d 0'0.00E,  9d 0'0.00N)
Center  (   5.500,   9.500) (  5d30'0.00E,  9d30'0.00N)
Band 1 Block=7200x128 Type=Byte, ColorInterp=Gray
  NoData Value=0

-

The map file is built programmatically, the following is the result of saving 
the map object to file:

MAP
  EXTENT 5 9.9 5.1 10
  IMAGETYPE png
  NAME blank
  SIZE 800 800
  STATUS ON
  UNITS DD

  OUTPUTFORMAT
NAME png
MIMETYPE image/png
DRIVER AGG/PNG
EXTENSION png
IMAGEMODE RGB
TRANSPARENT FALSE
  END # OUTPUTFORMAT

  PROJECTION
init=epsg:3857
  END # PROJECTION
  LEGEND
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
  SIZE MEDIUM
  OFFSET 0 0
  SHADOWSIZE 1 1
  TYPE BITMAP
END # LABEL
STATUS OFF
  END # LEGEND

  QUERYMAP
SIZE -1 -1
STATUS OFF
STYLE HILITE
  END # QUERYMAP

  SCALEBAR
INTERVALS 4
LABEL
  SIZE MEDIUM
  OFFSET 0 0
  SHADOWSIZE 1 1
  TYPE BITMAP
END # LABEL
SIZE 200 3
STATUS OFF
UNITS MILES
  END # SCALEBAR

  WEB
  END # WEB

  LAYER
DATA /home/leftworker/data/landcover/lefttiles/n10/globcover_n10e005.tif
NAME n10e005
PROJECTION
  init=epsg:4326
END # PROJECTION
STATUS ON
TILEITEM location
TYPE RASTER
UNITS DD
  END # LAYER

END # MAP





==
Dr David J Power
Research Officer
Department of Computer Science
University of Oxford
tel:   01865 283670
email: david.po...@cs.ox.ac.ukmailto:david.po...@cs.ox.ac.uk
==



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

Re: [mapserver-users] !-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE --

2013-07-31 Thread Fawcett, David (MNIT)
Avin, 

I am not sure I completely understand your question.  

Are you looking for IMAGEPATH and IMAGEURL in the WEB section of the mapfile?  
http://mapserver.org/mapfile/web.html

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of avin mohanza
Sent: Wednesday, July 31, 2013 6:50 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] !-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE --



i am working on a mapserver template, i want to change the [img] but i dont 
know what to change.. 

i have changed it into the location of my map image. and also change it into 
location of temporary directories where the image stored.

i have seen the example on the internet, they change it with the directory 
where the image map is produced in temporary directoy.

input type=image name=img src=[img] width=400 height=300
border=0/input



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/DISPLAY-THE-MAPSERVER-CREATED-MAP-IMAGE-tp5069882.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] MAXSIZE on Windows

2013-05-08 Thread Fawcett, David (MNIT)
Louis, 

I am guessing that QGIS is requesting an image that is too large.  You might 
try enabling debugging to see the WMS request that QGIS is sending.  I think 
that with a high debug level it should log the request.

http://mapserver.org/optimization/debugging.html

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Luís de Sousa
Sent: Wednesday, May 08, 2013 9:40 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] MAXSIZE on Windows

Dear all,

I have set up MapServer for the first time on Windows using MS4W, and the 
installation itself went well. I then tried to set up a map file and retrieve 
the data with QGis. No matter what I always get an error like this:

msWMSLoadGetMapParams(): WMS server error. Image size out of range, WIDTH and 
HEIGHT must be between 1 and 32736 pixels.

I'm using map files that I use in Linux without needing to set MAXSIZE. On 
Windows not only it seems to be necessary, it seems also to require a large 
figure. Anyone knows what size should be set? Or is this error being caused by 
something else?

Thank you,

Luis



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/MAXSIZE-on-Windows-tp5052107.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] MAXSCALEDENOM : different values between two servers

2013-03-28 Thread Fawcett, David (MNIT)
You could try to explicitly set the RESOLUTION to see if that makes a 
difference.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Fernando Norte
Sent: Thursday, March 28, 2013 8:17 AM
To: Lime, Steve D (MNIT)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] MAXSCALEDENOM : different values between two 
servers

yeap... same mapfile, just a copy.
I guess it might be about some pre-defined value envolved in scale resolution 
calc, but don't make any idea what it is or/and how to set.

thanks,


Fernando Norte

Desenvolvedor SIGWeb

tel.(31) 2533.9900

cel.(31) 9119.8814

skype: fernandoglobalgeo

[http://globalgeo.com.br/assinaturas/logo.png]


Endereço: Alameda do Ingá, 88, 6º andar, Vale do Sereno

Nova Lima/MG - CEP: 34.000-000

www.globalgeo.com.brhttp://www.globalgeo.com.br/

O presente documento pode conter material confidencial ou seu sigilo é 
protegido por lei.
Quaisquer informações nele contida são destinadas exclusivamente ao(s) seu(s) 
destinatário(s)
não devendo em nenhuma hipótese ser repassado a terceiros.

2013/3/27 Lime, Steve D (MNIT) 
steve.l...@state.mn.usmailto:steve.l...@state.mn.us
Exact same mapfile?


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 Fernando Norte 
[ferna...@globalgeo.com.brmailto:ferna...@globalgeo.com.br]
Sent: Wednesday, March 27, 2013 9:48 AM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] MAXSCALEDENOM : different values between two servers
Hello,

I have a problem using the MAXSCALEDENOM when transfer to a differnet server.
I developed localy, testing etc, and then send to another remote server.
The problem is:
In my local machine I use, for example, a value to MAXSCALEDENOM 650 
(1:6.5M)
This was not working in my remote server, then I found that if this scale is 
divided by 10 works fine: MAXSCALEDENOM 65

Since the both using MapServer version 6, booth are Linux, what should happen 
to this scale change?

Thanks,


Fernando Norte

Desenvolvedor SIGWeb

tel.(31) 2533.9900tel:%2831%29%202533.9900

cel.(31) 9119.8814

skype: fernandoglobalgeo



Endereço: Alameda do Ingá, 88, 6º andar, Vale do Sereno

Nova Lima/MG - CEP: 34.000-000

www.globalgeo.com.brhttp://www.globalgeo.com.br/

O presente documento pode conter material confidencial ou seu sigilo é 
protegido por lei.
Quaisquer informações nele contida são destinadas exclusivamente ao(s) seu(s) 
destinatário(s)
não devendo em nenhuma hipótese ser repassado a terceiros.

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


Re: [mapserver-users] label issues...

2013-03-18 Thread Fawcett, David (MNIT)
Mark,

You will want to add a LABEL block to your mapfile.  
http://mapserver.org/mapfile/label.html

I would also comment out the maxscale until you get the labels working.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees
Sent: Monday, March 18, 2013 2:48 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] label issues...

Hi all,

Ok so now I have a new problem with the labeling.

I would like to get my labels to start showing up at a scale of 1:100 but 
nothing is working...

here is a snippet of my mapfile...

  LAYER
NAME 'mjcities'
TYPE POINT
DUMP false
  EXTENT -143.210462 39.001401 -50.461045 85.911094
DATA '../data/mjcities.shp'
METADATA
  'ows_title' 'mjcities'
END
STATUS default
 MAXSCALE 100
 TRANSPARENCY 100
 CLASSITEM 'NAME'
  LABELITEM 'NAME'
 PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'mjcities'
   STYLE
 SYMBOL circle
 SIZE 15.0
 OUTLINECOLOR 0 0 0
 COLOR 182 109 194
   END

Thanks,
Mark





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


Re: [mapserver-users] label issues...

2013-03-18 Thread Fawcett, David (MNIT)
You want to create a class in your layer and place it there.

http://mapserver.org/mapfile/class.html

Like this:

MAP
LAYER
CLASS
LABEL
END # end of label
END # end of class

END  #end of layer

END #end of map

From: Mark Mirrlees [mailto:mmirrl...@hotmail.com]
Sent: Monday, March 18, 2013 3:00 PM
To: Fawcett, David (MNIT); mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] label issues...

Ok so I want to stick this code into the .map file... where should it be placed 
in the section that i bolded?

LABEL
  COLOR 255 255 255
  FONT arial
  TYPE truetype
  SIZE 10
  ANGLE 0
  POSITION cc
  FORCE false
  ANTIALIAS false
  PARTIALS false
 END

Thanks,
Mark

From: david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us
To: mmirrl...@hotmail.commailto:mmirrl...@hotmail.com; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] label issues...
Date: Mon, 18 Mar 2013 19:51:42 +
Mark,

You will want to add a LABEL block to your mapfile.  
http://mapserver.org/mapfile/label.html

I would also comment out the maxscale until you get the labels working.

David.

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees
Sent: Monday, March 18, 2013 2:48 PM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] label issues...

Hi all,

Ok so now I have a new problem with the labeling.

I would like to get my labels to start showing up at a scale of 1:100 but 
nothing is working...

here is a snippet of my mapfile...

  LAYER
NAME 'mjcities'
TYPE POINT
DUMP false
  EXTENT -143.210462 39.001401 -50.461045 85.911094
DATA '../data/mjcities.shp'
METADATA
  'ows_title' 'mjcities'
END
STATUS default
 MAXSCALE 100
 TRANSPARENCY 100
 CLASSITEM 'NAME'
  LABELITEM 'NAME'
 PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'mjcities'
   STYLE
 SYMBOL circle
 SIZE 15.0
 OUTLINECOLOR 0 0 0
 COLOR 182 109 194
   END

Thanks,
Mark





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


Re: [mapserver-users] label issues...

2013-03-18 Thread Fawcett, David (MNIT)
Mark,

I think that you are close.  You can likely simplify your layer a little by 
dropping out the properties that have a default, e.g. angle, position, etc.  
You also might want to comment out the FORCE and PARTIALS until you see that 
you are drawing labels.

You should also be able to put the combine the two classes and have your label 
and symbol in the same class.

Classes are about 'classifying' your data.  In some cases you have multiple 
classes, one for each data range.  E.g. where a column value is less than 10, 
one where it is more than 10 and less than 100, and one where it is greater 
than 100.  Each class would likely have a different symbolization then.

At a minimum, you need one class.  This is what you need.

David.

From: Mark Mirrlees [mailto:mmirrl...@hotmail.com]
Sent: Monday, March 18, 2013 3:21 PM
To: Fawcett, David (MNIT); mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] label issues...

Ok so if I understand this is what it should look like? (stuff thats been added 
is in red) Please correct this if i'm wrong as I am still having a bit of 
problems...

  LAYER
NAME 'mjcities'
TYPE POINT
DUMP false
EXTENT -143.210462 39.001401 -50.461045 85.911094
DATA '../data/mjcities.shp'
METADATA
'ows_title' 'mjcities'
END
STATUS default
MAXSCALE 100
TRANSPARENCY 100
CLASS
LABEL
COLOR 255 255 255
FONT arial
TYPE truetype
SIZE 10
ANGLE 0
POSITION cc
FORCE false
ANTIALIAS false
PARTIALS false
END
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'mjcities'
STYLE
SYMBOL circle
SIZE 15.0
OUTLINECOLOR 0 0 0
COLOR 182 109 194
END





From: david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us
To: mmirrl...@hotmail.commailto:mmirrl...@hotmail.com; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] label issues...
Date: Mon, 18 Mar 2013 20:05:55 +
You want to create a class in your layer and place it there.

http://mapserver.org/mapfile/class.html

Like this:

MAP
LAYER
CLASS
LABEL
END # end of label
END # end of class

END  #end of layer

END #end of map

From: Mark Mirrlees [mailto:mmirrl...@hotmail.com]
Sent: Monday, March 18, 2013 3:00 PM
To: Fawcett, David (MNIT); 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] label issues...

Ok so I want to stick this code into the .map file... where should it be placed 
in the section that i bolded?

LABEL
  COLOR 255 255 255
  FONT arial
  TYPE truetype
  SIZE 10
  ANGLE 0
  POSITION cc
  FORCE false
  ANTIALIAS false
  PARTIALS false
 END

Thanks,
Mark

From: david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us
To: mmirrl...@hotmail.commailto:mmirrl...@hotmail.com; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] label issues...
Date: Mon, 18 Mar 2013 19:51:42 +
Mark,

You will want to add a LABEL block to your mapfile.  
http://mapserver.org/mapfile/label.html

I would also comment out the maxscale until you get the labels working.

David.

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Mirrlees
Sent: Monday, March 18, 2013 2:48 PM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] label issues...

Hi all,

Ok so now I have a new problem with the labeling.

I would like to get my labels to start showing up at a scale of 1:100 but 
nothing is working...

here is a snippet of my mapfile...

  LAYER
NAME 'mjcities'
TYPE POINT
DUMP false
  EXTENT -143.210462 39.001401 -50.461045 85.911094
DATA '../data/mjcities.shp'
METADATA
  'ows_title' 'mjcities'
END
STATUS default
 MAXSCALE 100
 TRANSPARENCY 100
 CLASSITEM 'NAME'
  LABELITEM 'NAME'
 PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'mjcities'
   STYLE
 SYMBOL circle
 SIZE 15.0
 OUTLINECOLOR 0 0 0
 COLOR 182 109 194
   END

Thanks,
Mark





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


Re: [mapserver-users] posting variable to map file from html page

2013-02-14 Thread Fawcett, David (MNIT)
Murat,

Starting at 6.0, you need to add a validation block to your layer.  With 
validation, you include an expression that defines which characters are allowed 
to be passed in that variable.

http://mapserver.org/cgi/runsub.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Murat Beyhan
Sent: Thursday, February 14, 2013 9:12 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] posting variable to map file from html page

Dear Friend
After installing mapserver 6.0.1 I have faced a problem that
I could not post string variable into the map file.
It was working well for mapserver 5.4.2 but it doesn't work for new version
from html file I have sending eq_id to the map file
and in layer I use the following

 SrcSQLSELECT sta_id,latitude,longitude from pgav where eq_id like  %eq_id% 
 /SrcSQL


it was worked for mapserver 5.4.2 but I could not sent when I installed new 
version of map file.
May be it caused by new apache2 server. But in case please help me.
Regards...
Murat
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problem with attribute query, multiple attributes

2012-11-29 Thread Fawcett, David (MPCA)
Since OGR accesses the GDB via ESRI's API/Library, it may (should) take 
advantage of attribute indexes built on the data with ArcMap.  

You should make sure that the feature classes in the GDB have attribute indexes 
on any column that you want to use as query criteria and that they have good 
spatial indexes as well.  

If you don't have access to ESRI tools, you will likely want to pre-process the 
data by dumping it from the GDB to shapefiles or PostGIS, where you can create 
all of the indexes that you need.  

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bistrais, Bob
Sent: Thursday, November 29, 2012 8:45 AM
To: Jeff McKenna; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Problem with attribute query, multiple attributes

Thanks Jeff.  That link shows how to build an index on a shapefile.  Is there 
an equivalent for File GDB?  I'm looking at the GDAL document for GDB now, not 
seeing an index description.

-Original Message-
From: Jeff McKenna [mailto:jmcke...@gatewaygeomatics.com]
Sent: Wednesday, November 28, 2012 6:41 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Problem with attribute query, multiple attributes

On 12-11-28 5:43 PM, Bistrais, Bob wrote:
 I am trying to set up an attribute query for a large parcel dataset 
 (about 550,000 polygons).  I am having trouble with the query 
 exceeding the 30 second limit.
 
  
 
 I am trying to query on the map_bk_lot and town attributes.  I can 
 query on either one separately and get results, but I need to query on 
 both at the same time.
 
  
 
 Here is my query expression:
 
 $queryExp = ('[TOWN]' == '007-042') AND ('[TOWN]' == 'Acton')); 
 ---Hardcoded for testing now, will eventually use variables
 
 $pLayer-queryByAttributes(MAP_BK_LOT,$queryExp,MS_SINGLE);   
 Query statement
 
  
 
 The data is in an ESRI File GDB.  I am using MS4w 3.0.4m MapServer 
 6.0.2, MapScript 6.1 for PHP
 
  
 
 One other thing worth mentioning- if I use a small subset of features 
 (such as a town), the query will work without timing out.  But I'm no 
 longer convinced that dataset size is the problem since it will query 
 on one attribute.
 
  
 
 Any ideas what's going wrong here?

A tip that might come in handy someday, if not in this case, could be to create 
an attribute index on your vector field (see example in 
http://www.gdal.org/ogr/drv_shapefile.html); I've done this before and it's 
improved attribute queries in MapServer significantly.  You can generate one 
through an ogrinfo command with the sql switch.

Sorry I cannot provide exact FileGDB examples at the moment.

-jeff



--
Jeff McKenna
MapServer Consulting and Training Services http://www.gatewaygeomatics.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] SDE Connection

2012-09-11 Thread Fawcett, David (MPCA)
With earlier versions like 9.2, ESRI put the SDK install files out on their Web 
site.  With some of the later versions, you need to have the install CDs.

You didn't say what service pack version you are running with 9.2, but here is 
a page with the SDK for 9.2 sp2:  
http://support.esri.com/en/downloads/patches-servicepacks/view/productid/66/metaid/1269
  If you are on a different version, Google found this page in about 5 seconds.

You may also have an issue with supported platforms, they usually have a page 
listing supported Linux disros and versions.  In the past, they have listed Red 
Hat, but not CentOS.  That doesn't mean that it won't work, I just don't know.

If this doesn't work, or doesn't perform well, you might want to think about a 
simple ESRI Python script that pulls the data out of the production SDE 
database and push it into a PostGIS database or even shapefiles for use by 
MapServer.  You could script it to run on some set time period.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mike Saunt
Sent: Tuesday, September 11, 2012 3:25 AM
To: Michele De Santis
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] SDE Connection


I'm not aware of them being publicly available.   They should be in the esri 
media pack that comes with arcsde
On Sep 11, 2012 9:23 AM, Michele De Santis 
tap...@virgilio.itmailto:tap...@virgilio.it wrote:
Dear list,

I want to connect Mapserver 6.0.3 to SDE 9.2. MapServer is on a Linux Centos 
Machine while SDE is on Windows Machine. I have just read that I must have the 
SDE client librairies at my disposition, and have them installed on the machine 
running MapServer.

Are this client librairies available for public download?

Thanks to all

___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] retrieve map coordinates with different EPSG

2012-09-07 Thread Fawcett, David (MPCA)
I looked at the documentation because I haven't used in a while.  The docs 
aren't clear, but seem to imply that MAPXY should return coordinates in the 
same spatial reference system as the layer that you are querying.

I kind of think that they should be in the spatial reference system of the map. 
 Either way, try setting the map projection to the SRS that you want to get the 
coordinates back in.  You will also have to change the extent values.

David.


http://mapserver.org/cgi/controls.html

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Andrea Peri
Sent: Friday, September 07, 2012 4:18 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] retrieve map coordinates with different EPSG

Hi,
Usign the templating capabilities of mapserver.
I need the parameters [mapx] and [mapy] will return the coordinate of a clicked 
point.

I possible in the templates set semothing to have this coordinates [mapx], 
[mapy] in a different
SRS ?
I see there is the [maplon] and [maplat] parameter.
But I need have the coords in another projected EPSG system rather than 
geographic 4326.

Thx

--
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] label MINSCALEDENOM, MAXSCALEDENOM usage

2012-08-30 Thread Fawcett, David (MPCA)
You may want to read the mapfile documentation.  Here is the page for layers:  
http://mapserver.org/mapfile/layer.html

I would also suggest only sending messages to one of the mapserver lists at a 
time.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ??
Sent: Thursday, August 30, 2012 10:24 AM
To: mapserver-users@lists.osgeo.org
Cc: mapserver-...@lists.osgeo.org
Subject: [mapserver-users] label MINSCALEDENOM, MAXSCALEDENOM usage

Hi. I use basemaps to generated the .mapfile for my osm postgis data. But I 
found some lable in the mapfile such asMINSCALEDENOM,MAXSCALEDENOM. I am not 
very understand these labels. If use these labels,when enlarge ,will make the 
image disappear. If I delete the labels in th emapfile, enlage will no problem. 
I mean enlarge is I using a link like 
this:http://127.0.0.1/cgi-bin/mapserv?map=/home/jack/osm-demo/basemaps/osm-google.maplayer=alltemplate=openlayers;,
 then click the enlarge. Can anyone give some guide?

Also I use the mafile which basemaps generated automaticlly, using the above do 
not show any content, but if  I move the  MINSCALEDENOM,MAXSCALEDENOM label , 
it will show some content.

--
Yang Li
GIS Developer
P.R.China


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


Re: [mapserver-users] mapserver user can not make the shapefile data correctly show in the browser

2012-08-22 Thread Fawcett, David (MPCA)
Yang Li,

You may want to try to use a relative URL for the IMAGEURL.

Try changing it from:

IMAGEURL /output/

To:

IMAGEURL output/


David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ??
Sent: Wednesday, August 22, 2012 11:50 AM
To: mapserver-users@lists.osgeo.org
Cc: mapserver-...@lists.osgeo.org
Subject: [mapserver-users] mapserver user can not make the shapefile data 
correctly show in the browser


Hello,
respected everyone,

I have a problem when using Mapserver. I just using Maperver to rend an 
shapefile on ubuntu 12.04. but the expect image is not correctly showing, i 
think there maybe some problem with my mapfile set, especially with IMAGEURL 
define?

I use a guide in the link 
:http://www.gistutor.com/mapserver/3-beginner-mapserver-tutorials/7-how-to-generate-a-simple-map-using-mapserver-and-a-shapefile.html



I assign the mapfile  template.htmlstart.html in my www DIR,

which is like this:

mapfiel.map:

MAP

NAME parcels_map

STATUS ON

SIZE 420 300

EXTENT 489885 5450946 490904 5451637

UNITS METERS

SHAPEPATH shapefiles

IMAGECOLOR 255 255 255

WEB

TEMPLATE template.html

IMAGEPATH /var/www/output/

IMAGEURL /output/

END

LAYER

NAME parcel_boundaries

DATA parcels

STATUS DEFAULT

TYPE POLYGON

CLASS

NAME parcels_color

COLOR 255 215 0

END

END

# end of map file

END





starrtmap.html:

html

headtitleCreating a simple image using Mapserver and a 
Shapefile/title/head

body bgcolor=#FF

h2Creating a simple image using Mapserver and a Shapefile/h2

phrp

This page simply contains a link which sends a set of instructions to the 
Mapserver application using a mapfile.br /

The information stored within the mapfile tells the Mapserver application how 
to draw the map.p

!-- The following link sends the local file structure path of the mapfile to 
the web location of the mapserver executable file --

A HREF=http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map;

Click on this link/A to view a map generated using a Shapefile.

phrp

/body

/html



template.html:

!-- MapServer Template --

html

headtitleSimple Mapserver Template HTML Document/title/head

body bgcolor=#AA

h2The image below was illustrated based on the instructions sent in the 
mapfile./h2

!-- When using Mapserver with a template, the Mapserver application looks for 
the [img] tag within the template document to place the map --

img src=/[img] border=1

/body

/html



when I run the “http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map” in 
my address colum.

The expect map is not shown.



The page is showing content of template.html expectly, but there is only a 
image icon , but with no picture. And the status bar in the firefox brower is 
showing : conecting to output ..



I notice that in the var/www/output DIR, there have been some png file 
generated. And is the png containing the polygon in the shapefile. Every time 
when I click the “http://localhost/cgi-bin/mapserv?map=/var/www/mapfile.map” 
link, a new png file is generated in output DIR.



I want to know if the IMAGEURL in the mapfile is set wrongly? Why the png is 
genrated correctly but not showing in the browser? Any one can help me?


--
Yang Li
GIS Developer
P.R.China


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


Re: [mapserver-users] validation block

2012-08-21 Thread Fawcett, David (MPCA)
I do something like the second example in one of my applications.  I send the 
comma-delimited string for use as part of the IN statement.  

This basically allows you to symbolize features from your spatial data set 
based on data passed in through the URL.  

I pass these URL vars:
group1=129,119,041,005,159,051,011,147,097,015,067,171,081,063,025,093,009,149,079,049,065,003,143,027,039,007,099,121,151,135,107,047,033,031,023,089,001,013,161,109,139,061,055,101,045,127,113,117,167,085,133,073,071,157,105,083,165,077,111,059,115,019,153,125,169,087,043,145,017,131,021,173,035,095,091,155,057,103,075,029,069group2=137,163,037,141,123group3=group4=053

Here is the layer definition:

LAYER
  NAME airdata
  STATUS DEFAULT
  DATA 'county_thin'
  TYPE POLYGON
  TEMPLATE templates/emiss_imap_template.html

  VALIDATION
 group1 ^[0-9\,]+$
 group2 ^[0-9\,]+$
 group3 ^[0-9\,]+$
 group4 ^[0-9\,]+$
  END
  CLASS
 NAME group1
   EXPRESSION ('[county_fip]' IN '%group1%')
   STYLE
   COLOR 241 238 246
   END
  END
  CLASS
 NAME group2
   EXPRESSION ('[county_fip]' IN '%group2%')
   STYLE
   COLOR 189 201 225
   END
  END
  CLASS
 NAME group3
   EXPRESSION ('[county_fip]' IN '%group3%')
   STYLE
   COLOR 116 169 207
   END
  END
  CLASS
 NAME group4
   EXPRESSION ('[county_fip]' IN '%group4%')
   STYLE
   COLOR 5 112 176
   END
  END

END

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge
Sent: Tuesday, August 21, 2012 1:16 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] validation block

Typically the SQL syntax is   column in (a,b,c,d)
So based on this

[id_bassin] in '%ID_BASSIN%'

would be problematic I think because your syntax is:

column in 'string'

Which is not valid. Also what is your validation for %ID_BASSIN%?
Is something like this?   ^\([0-9]+(,[0-9]+)*\)$

where ID_BASSIN=(123,234,345)

or do you want something like:

[id_bassin] in (%ID_BASSIN%)

with a valdiation like:  ^[0-9]+(,[0-9]+)*$

where ID_BASSIN=123,234,345

-Steve W

On 8/21/2012 1:33 PM, Marc-André Trottier wrote:
 here is an example of two class in 'adn_station_max_v.map' :

 CLASS
  NAME Information non disponible (grande échelle)
  EXPRESSION ( '[etat]' = 'GRIS' AND [id_bassin] in '%ID_BASSIN%')
  GROUP BASSIN
  MINSCALEDENOM 0
  MAXSCALEDENOM 15
  STYLE
  SYMBOL 'circle'
  COLOR 128 128 128
  OUTLINECOLOR 0 0 0
  SIZE 9
  END

  LABEL
  COLOR   0 0 0
  OUTLINECOLOR255 255 255
  ANTIALIAS   FALSE
  TYPETRUETYPE
  FONTubuntu
  SIZE14
  POSITION auto
  FORCE TRUE
  END
 END

 CLASS
  NAME Seuil d\'inondation majeure
  EXPRESSION ( '[etat]' = 'ROUGE' AND [region_admin_id] in '%ID_REG%')
  GROUP REG_ADMIN
  MINSCALEDENOM 11

  STYLE
  SYMBOL 'circle'
  COLOR   255 0 0
  OUTLINECOLOR 0 0 0
  SIZE 14
  END

  LABEL
  WRAP!
  ALIGN   CENTER
  COLOR   0 0 0
  OUTLINECOLOR255 255 255
  ANTIALIAS   FALSE
  TYPETRUETYPE
  FONTubuntu
  SIZE14
  FORCE TRUE
  OFFSET  0 12
  END
 END

 if i understant this meant that for a layer, i must validate all 
 variables of all class even if i don't use them all.
 My include of 'adn_station_max_v.map' contains X substitutions in X 
 class so i must have X validations even if i don't use all X class.

 In my example, i include many class with 'adn_station_max_v.map' but 
 i'm using only one variable at a time. All class in CLASSGROUP 'REG_ADMIN'
 only use 'ID_REG'.


 2012/8/21 Stephen Woodbridge wood...@swoodbridge.com 
 mailto:wood...@swoodbridge.com

 You probably need to quote:

'ID_BASSIN' '[[a-zA-Z0-9]{0,10},??]*'

#ID_REG' '[[a-zA-Z0-9]{0,10},??]*'

 And I would be very suspicious that '#ID_REG' is a value identifier
 because of the '#' character.

 -Steve W


 On 8/21/2012 11:38 AM, Marc-André Trottier wrote:

 there is my layer's definition :

   LAYER
   VALIDATION
   ID_BASSIN '[[a-zA-Z0-9]{0,10},??]*'
   #ID_REG '[[a-zA-Z0-9]{0,10},??]*'
   END
   INCLUDE ../layers/bd/adn_station_max___v.map
   CLASSGROUP BASSIN
   NAME adn_station_bassin
   END

   LAYER
   VALIDATION
   #ID_BASSIN 

Re: [mapserver-users] Reading a custom GDAL raster format via MapServer...

2012-08-09 Thread Fawcett, David (MPCA)
Is MapServer using the same GDAL as the commandline GDAL that can successfully 
open the file?

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Shri I
Sent: Thursday, August 09, 2012 9:49 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Reading a custom GDAL raster format via MapServer...

Hello All,

I have been trying to read a custom GDAL raster format via MapServer. 
(Unfortunately, I'm unable to share the file itself here, as it is a 
proprietary format).  MapServer is unable to read the raster and display it.   
However, GDAL is able to read (gdalinfo, etc), translate (gdal_translate), 
transform (gdalwarp) the raster. Any ideas how to solve this?  MapServer is 
compiled with GDAL support and everything looks OK. The gdalinfo --formats  
command shows the format is supported.

Here are the errors in my log:
msDrawMap(): rendering using outputformat named png (AGG/PNG).
msDrawMap(): WMS/WFS set-up and query, 0.000s
msDrawRasterLayerLow(testLayer): entering.
msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file 
'/path/to/myfile.ext' for layer 'testLayer'.
Image handling error. Failed to draw layer named 'testLayer'.
msFreeMap(): freeing map at 0xf8b8f0.


And here's the MapServer error included in the image or shown on the command 
prompt (when ran using mapserv command):
msDrawMap(): Image handling error. Failed to draw layer named 'testLayer'.
msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file 
'/path/to/myfile.ext' for layer 'testLayer'.
GDAL: GDALDeregister_GTiff() called.



Here's how my layer definition looks like:
LAYER
NAME testLayer
TYPE RASTER
DATA /path/to/myfile.ext   # -- Tested with realtive path from 
shapepath and also direct path, as in this case.
STATUS ON
END


Thank you for your helpful pointers.

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


Re: [mapserver-users] World File's

2012-06-19 Thread Fawcett, David (MPCA)
Maybe convert to planar coordinates, calculate the other corners based on 
distance and then convert back to LCC?

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff Lake
Sent: Tuesday, June 19, 2012 1:51 PM
To: MapServer
Subject: [mapserver-users] World File's

Heres a trick question for anybody that wants to tackle it ..

I have ...
Lower Left Lat/Long
Upper Right Lat/Long
Center Lat/Long
and the LCC Projection Angles

I am attempting to create a World File for each of these maps (8 in total) all 
the calculations I have found require Upper Left and Lower Right well you can't 
just use the pairings I have as it will change being projected and not grid

anybody got any idea's ???



--
-Jeff Lake
MichiganWxSystem.com
WeatherMichigan.net
TheWeatherCenter.net
GRLevelXStuff.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] elevation profile

2012-05-07 Thread Fawcett, David (MPCA)
Thanks Puneet.  Very nice looking app.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor
Sent: Saturday, May 05, 2012 1:15 PM
To: mapserver
Subject: Re: [mapserver-users] elevation profile

The elevation profile widget is finally implemented at 
http://earth-base.org/geomaps

Click on the fourth button from the top on the left, then draw a line on the 
map to see the profile. As with all my apps, the values themselves can be 
retrieved by querying for them directly from the browser or from the command 
line. For example

http://earth-base.org/geomaps/elevation.json?linestring=LINESTRING(-118.706+37.933%2C-109.477+42.494)


This one is dedicated to Steve Woodbridge, Brent Wood and David Fawcett.



 ..




--
Puneet Kishor___
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] No map in preview

2012-03-28 Thread Fawcett, David (MPCA)
If you are really trying to get a Geoserver instance running, I would suggest 
the Geoserver mailing list..

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Dott. Scolavino 
Alessandro
Sent: Wednesday, March 28, 2012 3:22 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] No map in preview

Hi,
i just finished loading in postgis the global data.
I tryed to display layer with geoserver but i see only white map.

It's a common problem?
If someone have 5 minutes to take a fast look on my geoserver to see if 
i made a mistake or if i have to rebuild the db (maybe something went 
wrong with the population i had to run it in background since it take 
more than 3 days...)
i'll give the server address and login data (pvm)


thanx!!!

-- 
- --
Ai sensi del DL 196/2003 si precisa che le informazioni contenute in questo
messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il
messaggio in parola Le fosse pervenuto per errore, la Preghiamo di
eliminarlo senza copiarlo e di non inoltrarlo a terzi, dandocene gentilmente
comunicazione. Grazie.

Cordiali saluti

-    Dott. Alessandro Scolavino 
-    http://www.webair.it   
-    http://www.clerk.it

___
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] RE: HI

2012-03-21 Thread Fawcett, David (MPCA)
I haven't tested it, but try something like this:

LAYER
NAME 'gtroads'
TYPE LINE
DUMP false
  EXTENT -143.208273 40.614882 -50.461099 84.297613
DATA '../Data/gtroads.shp'
METADATA
  'ows_title' 'gtroads'
END
STATUS DEFAULT
#TRANSPARENCY 100
   # TRANSPARENCY is deprecated, use OPACITY  if you want to create a 
semi-opaque layer.
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
   NAME 'expressway'
   EXPRESSION '[ROADTYPE]' = 'expressway'  # substitute your column name 
and data value here
   STYLE
 WIDTH 3.5
 COLOR 255 0 0
   END
END
CLASS
   NAME 'primary'
   EXPRESSION '[ROADTYPE]' = 'primary'  # substitute your column name and 
data value here
   STYLE
 WIDTH 2.5
 COLOR 0 255 0
   END
END
  END

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Özgür Arslan
Sent: Tuesday, March 20, 2012 10:32 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: HI

Hi All,

I am working on a project and I am trying to split a roads layer called 
gtroads. Roads layer should be split into two classes Expressway and Primary 
highway based on the TYPE field. How can I split the layer? Could someone 
help me about the problem? Thanks. The code line like below:

LAYER
NAME 'gtroads'
TYPE LINE
DUMP false
  EXTENT -143.208273 40.614882 -50.461099 84.297613
DATA '../Data/gtroads.shp'
METADATA
  'ows_title' 'gtroads'
END
STATUS DEFAULT
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASS
   NAME 'gtroads'
   STYLE
 WIDTH 3.5
 COLOR 0 0 0
   END
END
  END
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Aligning labels within a polygon

2012-02-21 Thread Fawcett, David (MPCA)
If you are storing the data in PostGIS, you could possibly take advantage of 
ST_Azimuth().  http://www.postgis.org/docs/ST_Azimuth.html

It takes two point objects as the args, but you could potentially use the start 
and end points of your linestring.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Tuesday, February 21, 2012 10:23 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Aligning labels within a polygon

Hi,

I'm inputting lots of street address points in PostGIS, and try to generate 
labels for the streets. The convex hull of the points of a street approximate 
the course of the street, and I would like to position the streetname in the 
middle of the convex hull polygon, aligned to its dominant angle (the polygons 
are generally quite narrow). Is there a way of doing this with MapServer? 
Perhaps by thinning out the polygon to a line, for then I can use angle 
follow.

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


RE: [mapserver-users] Aligning labels within a polygon

2012-02-21 Thread Fawcett, David (MPCA)
Several years ago, I wrote some Python code to roughly georeference air photos. 
 As part of that, I needed to come up with the best approximation of the 
heading of the airplane.

What worked pretty well was to do a really simple line fitting based on the 
points.  My samples were points from an airplane that was attempting to fly in 
a straight line, with vertices generated by a camera taking pictures at regular 
intervals, so that helped.

I simply split the vertices of the line into three groups by dividing the total 
number of points by 3.  I averaged the x and y values in each group and then 
created a line from the average coord from group1 to the average coord from 
group3.

Street data will likely be more variable (curved), but you may want to explore 
something like this.  Of course, you would likely want to calculate these label 
angles using pre-processing to speed up rendering time.

David.



From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Tuesday, February 21, 2012 11:18 AM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Aligning labels within a polygon

Going a step further:

st_longestline(st_collect(the_geom),st_collect(the_geom))

gives the longest line segment that can be drawn within the cluster of street 
address points. Works for non-curved streets. I'm still looking for a more 
intelligent way to thin out a polygon to a (multi)line.

Jan

On 02/21/2012 05:27 PM, Fawcett, David (MPCA) wrote:
If you are storing the data in PostGIS, you could possibly take advantage of 
ST_Azimuth().  http://www.postgis.org/docs/ST_Azimuth.html

It takes two point objects as the args, but you could potentially use the start 
and end points of your linestring.

David.

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jan Hartmann
Sent: Tuesday, February 21, 2012 10:23 AM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Aligning labels within a polygon

Hi,

I'm inputting lots of street address points in PostGIS, and try to generate 
labels for the streets. The convex hull of the points of a street approximate 
the course of the street, and I would like to position the streetname in the 
middle of the convex hull polygon, aligned to its dominant angle (the polygons 
are generally quite narrow). Is there a way of doing this with MapServer? 
Perhaps by thinning out the polygon to a line, for then I can use angle 
follow.

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


RE: [mapserver-users] Does Mapserver utilise Spatialite spatial index correctly?

2012-02-14 Thread Fawcett, David (MPCA)
Great work Jukka (and Even).  Thanks for pursuing this!!

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka
Sent: Tuesday, February 14, 2012 2:24 AM
To: 'mapserver-users@lists.osgeo.org'
Subject: Re: [mapserver-users] Does Mapserver utilise Spatialite spatial index 
correctly?

 
Rahkonen Jukka wrote:
 
  Even Rouault wrote:
 
 
  I've commited improvements in GDAL trunk for both points (
  http://trac.osgeo.org/gdal/changeset/23944 and
  http://trac.osgeo.org/gdal/changeset/23945 ) that make the 
 above request go
  from 1.7 sec to 0.54 sec . I don't think there's any more 
 significant speed
  gain to expect now (at least on OGR side).
 
  Actually, I found a new improvement (committed in
  http://trac.osgeo.org/gdal/changeset/23946) that make the 
 query time go down
  to 0.07 sec (*) ! There was a slowness when opening the 
 layer due to the
  presence of an ORDER BY clause in the DATA string, that was 
 evaluated before
  setting the spatial filter.
 
  (*) For comparison, I translated your database to Postgis, 
 and set-up the
  connection mapfile to use that Postgis database (still 
 through OGR, not the
  MapServer Postgis backend). The same request with OGR PG is 
 run in 0.18 sec.
 
 Awesome!  About 25 times faster in the evening than it was in 
 the morning. My opinion is that because Spatialite seems to 
 be, at least in this case, more that two times faster backend 
 for Mapserver than PostGIS it should lead to some intensive 
 and controlled testing now.

I updated the cgi-bin directory of my MS4W 3.0.4beta1 with the mapserv.exe and 
dll files taken from the brand new binaries from 
http://www.gisinternals.com/sdk/ (contains Mapserver and GDAL revisions r13144, 
r23972, respectively).

As a result Mapserver is really serving me 10, or 25 or even 40 times faster 
than it did before the update measured as WMS throughput (images/minute). The 
times include rendering times and all the lags in the system so the difference 
tells exactly how the end user feels it. Greatest enhancement is with close 
zooms because then the apatial index bites hardest. And at least with my 
computer Spatialite backend is clearly faster than PostGIS with the same data 
and it may be even faster than shapefiles but it is too early to say that 
really. But this is absolutely something worth more testing.

My test database is moderately sized and contains 10 points, 9 lines 
and 149000 polygons from OpenStreetMap data. I will myself do next trials with 
ten times bigger Spatialite database with something like million points, lines, 
and polygons. We do not have much bigger tables in our production. However, I 
do not believe we are changing from Oracle to SQLite/Spatialite very rapidly in 
our core business :)

-Jukka Rahkonen-

___
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] Does Mapserver utilise Spatialite spatial index correctly?

2012-02-13 Thread Fawcett, David (MPCA)
A pretty good story to tell when talking about the advantages of OpenSource 
software...

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka
Sent: Saturday, February 11, 2012 3:43 PM
To: Even Rouault; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Does Mapserver utilise Spatialite spatial index 
correctly?

 Even Rouault wrote:


 I've commited improvements in GDAL trunk for both points (


Awesome!  About 25 times faster in the evening than it was in the morning. My 
opinion is that because Spatialite seems to be, at least in this case, more 
that two times faster backend for Mapserver than PostGIS it should lead to some 
intensive and controlled testing now.

Regards,

-Jukka Rahkonen-___
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] Shapefiles not rendered

2012-01-13 Thread Fawcett, David (MPCA)
Juan,

The projection block at the map level specifies 4326 as the spatial reference 
system, but the units of your extent look like they are in meters, not decimal 
degrees.  This may be involved in the issue, or maybe not, but it would screw 
up a regular MapServer CGI request if you don't specify a bbox.

The use of a '.' Character in a layer name may be valid in MapServer and the 
OGC WMS spec, but it looks funky to me.  Again, probably not the problem.

I would simplify your map file by commenting out the MINSCALE, MAXSCALE, and 
TRANSPARENCY lines.  I am guessing that one of these is causing your problem.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Juan Jesús 
Cremades Monserrat
Sent: Friday, January 13, 2012 5:50 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Shapefiles not rendered

Hi,

I want execute the getMap method with an URL like this:

http://localhost:9000/cgi-bin/mapserv.exe?LAYERS=COMACOM.SHPFORMAT=image/pngTRANSPARENT=trueMAP=/ms4w/apps/demo-cv/demoCV.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapSTYLES=EXCEPTIONS=application/vnd.ogc.se_inimageSRS=EPSG:4326BBOX=-180,-90,180,90WIDTH=551HEIGHT=356

But the result is always a white page. Where the error may be? My MapServer is 
the MS4W. Thanks

My MapFile is this:

MAP
   NAME map_generated_by_gvsig
   EXTENT 626679.4375 4191039.75 797868.9375 4519396.0
   SYMBOLSET demoCV.sym
   FONTSET fonts.txt
   LEGEND
  IMAGECOLOR -1 -1 -1
  LABEL
 FONT vera
 ANGLE FOLLOW
 COLOR 0 0 0
 ENCODING UTF-8
 TYPE truetype
 SIZE 8
  END
  STATUS ON
  TRANSPARENT ON
   END

   SIZE 800 800
  OUTPUTFORMAT
NAME PNG24
DRIVER AGG/PNG
IMAGEMODE RGB
   END

   WEB
  METADATA
 wms_encoding UTF-8
 wms_title Mapserver WMS
 wms_abstract 
 wms_srs  EPSG:4326
 wms_onlineresource 
http://localhost:9000/cgi-bin/mapserv.exe?map=E%3A%5Cms4w%5Capps%5Cdemo-cv%5CdemoCV.map;
 ows_enable_request *
 wms_feature_info_mime_type text/html
  END
   END
   PROJECTION
  init=epsg:4326
   END
   LAYER
  NAME COMACOM.SHP
  STATUS ON
  DUMP true
  TEMPLATE templates/provincias.html
  TYPE POLYGON
  DATA E:\COMACOM.SHP
  MAXSCALE -1.0
  MINSCALE -1.0
  TRANSPARENCY 100
  SIZEUNITS pixels
  PROJECTION
 init=epsg:4326
  END
  CLASS
 STYLE
COLOR 104 108 2
OUTLINECOLOR 72 75 1
WIDTH 1
 END
 NAME default
  END
  METADATA
 wms_title COMACOM.SHP
 wms_abstract generated by gvSIG
 wms_extent 626679.4375 4191039.75 797868.9375 4519379.0
 gml_include_items all
 ows_enable_request *
  END
   END # Layer
END # Map File

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


RE: [mapserver-users] ticket for 'trimlast'?

2011-12-13 Thread Fawcett, David (MPCA)
Steve Lime has narrowed this bug down to the parsing of single quotes in 
template tags.  

The trimlast functionality will work if you use double quotes on the character 
to be trimmed.  

e.g. 

This works:  [feature trimlast=,]

This doesn't:  [feature trimlast=',']

I will file a ticket for a change in the documentation at:  
http://mapserver.org/output/template_output.html

David.

-Original Message-
From: Puneet Kishor [mailto:punk.k...@gmail.com] 
Sent: Thursday, October 20, 2011 4:15 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] ticket for 'trimlast'?


On Oct 20, 2011, at 4:06 PM, Fawcett, David (MPCA) wrote:

 I also can't get trimlast=',' to remove the trailing comma in a json 
 formatted query result.  
 
 [resultset layer=stations]
 {
  stations: [
[feature trimlast=',']
{
  name: [NAME],
  stationId: [STATION_ID
},
[/feature]
  ]
 }
 [/resultset]
 
 http://lists.osgeo.org/pipermail/mapserver-users/2011-September/070298.html
 
 I searched for a trac ticket, but didn't see one.  I will file one if someone 
 can confirm that this is still a real issue and that a ticket doesn't exist.
 


I can confirm that I experienced it as well.

--
Puneet Kishor



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


RE: [mapserver-users] Attribute query at geographic coordinate

2011-11-14 Thread Fawcett, David (MPCA)
If you didn't need to use WFS and just wanted to do MapServer queries, you 
could put together a template that would build you a list.  Take a look at the 
examples on this page:  http://mapserver.org/output/template_output.html

The JSON example is probably the most applicable.

Like others have mentioned, 500 data layers won't be efficient, so you may want 
to explore other data organization ideas.

David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Robert Sanson
Sent: Sunday, November 13, 2011 6:34 PM
To: mapserver-users@lists.osgeo.org; Peter Weilandt
Subject: Re: [mapserver-users] Attribute query at geographic coordinate

Hi Peter

You will have to write some of the server-side code for saving the results into 
a list, but the spatial query is called a GetFeatureInfo request, which is part 
of the WMS spec, which Mapserver can do well. Here is the format of a request:

http://myserver/cgi-bin/mapserve.exe?service=WMSversion=1.1.1request=GetFeatureInfoLAYERS=mapsheetQUERY_LAYERS=mapsheetINFO_FORMAT=text/plainSRS=EPSG:27200BBOX=2435500,5843425,2437500,5845425WIDTH=256HEIGHT=256X=128Y=128

Kind regards,

Robert Sanson

 Peter Weilandt peterweila...@shaw.ca 14/11/2011 1:07 p.m. 
I stumbled across MapServer in my search for a tool to use in a website.  I 
want to develop a website that will use a coordinate (lat  long), which is 
easily obtained from a user on the client side by clicking on a Google map, and 
then transferring this coordinate to the server side where it will be used to 
sequentially query many (500+) shapefile polygon layers, extracting the values 
from 2 fields from each layer at this coordinate, saving these values in a list 
(Excel, textfile?), and then using this list to return values to the user on 
the client side.  This sounds simple in concept, but is MapServer a tool that 
can accomplish this and, if so, are there any examples showing the code to use 
for such a query?



This email and any attachments are confidential and intended solely for the 
addressee(s). If you are not the intended recipient, please notify us 
immediately and then delete this email from your system.

This message has been scanned for Malware and Viruses by Websense Hosted 
Security.
www.websense.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] subsetted output, but I don't want that

2011-11-09 Thread Fawcett, David (MPCA)
Is the raster georeferenced?  It kind of sounds like it is using pixel 
coordinates instead of coordinates from a spatial reference system.  

What do you get if you run gdalinfo on the image file?

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of kablukiw
Sent: Wednesday, November 09, 2011 1:33 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] subsetted output, but I don't want that

I am new to mapserver and am experiencing difficulty with the output being
generated by mapserv.exe (using OSGeo4W). The output I am getting is showing
a subset of the original image even though I am not specifying any extents
that would indicate I want anything other than the full image.

The source file is a global image 1440x720 and the output I get is also
1440x720 but is showing only the bottom left 180x90 pixels of the source
image resized to 720x360 and placed in the upper right of the output image.

http://osgeo-org.1803224.n2.nabble.com/file/n6979235/test.png example output 

It seems as if the EXTENT is affecting the extent of the output but I'm not
sure how. I am currently testing this from the cmd line with the following
(I have seen the same issue when testing this mapfile with OpenLayers):

mapserv.exe -nh
QUERY_STRING=map=c:/OSGeo4W/apache/htdocs/kevin/lst.mapmode=map 
test.png

My map file:

MAP
NAME LST
SIZE 1440 720
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH c:/OSGeo4W/apache/htdocs/kevin/
IMAGECOLOR 255 255 255
IMAGETYPE PNG
STATUS ON
DEBUG ON

LAYER
NAME LST
TYPE RASTER
STATUS DEFAULT
DATA lst_1440.png
OFFSITE 0 0 0
END # LAYER
END # MAP

Any suggestions would be greatly appreciated. Thanks,

Kevin

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/subsetted-output-but-I-don-t-want-that-tp6979235p6979235.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] subsetted output, but I don't want that

2011-11-09 Thread Fawcett, David (MPCA)
Kevin, 

You could create a world file.  Here is a reference for the world file format:  
http://www.gdal.org/frmt_various.html#WLD


According to the gdal docs, a world file with an extension of .pgw, .pngw, or 
.wld will be read. http://www.gdal.org/frmt_various.html#PNG


As an example, the world file associated with this global raster from Natural 
Earth II 
http://www.naturalearthdata.com/downloads/50m-natural-earth-2/50m-natural-earth-ii-with-shaded-relief-and-water/


Contains the below text:
  0.03
  0.00 
  0.00 
  -0.03 
  -179.98 
  89.98


David.


-Original Message-
From: Kevin Ward [mailto:kablu...@gmail.com] 
Sent: Wednesday, November 09, 2011 1:47 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] subsetted output, but I don't want that

No, it's just a plain PNG. I was operating under the assumption that
the EXTENT and UNITS parameters in the mapfile would define the
coordinates of the source image but perhaps that is only constraining
the output?

If that is the case, how can I go about providing georeference for an
image such as that?

Kevin

On Wed, Nov 9, 2011 at 11:35 AM, Fawcett, David (MPCA)
david.fawc...@state.mn.us wrote:
 Is the raster georeferenced?  It kind of sounds like it is using pixel 
 coordinates instead of coordinates from a spatial reference system.

 What do you get if you run gdalinfo on the image file?

 David.

 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of kablukiw
 Sent: Wednesday, November 09, 2011 1:33 PM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] subsetted output, but I don't want that

 I am new to mapserver and am experiencing difficulty with the output being
 generated by mapserv.exe (using OSGeo4W). The output I am getting is showing
 a subset of the original image even though I am not specifying any extents
 that would indicate I want anything other than the full image.

 The source file is a global image 1440x720 and the output I get is also
 1440x720 but is showing only the bottom left 180x90 pixels of the source
 image resized to 720x360 and placed in the upper right of the output image.

 http://osgeo-org.1803224.n2.nabble.com/file/n6979235/test.png example output

 It seems as if the EXTENT is affecting the extent of the output but I'm not
 sure how. I am currently testing this from the cmd line with the following
 (I have seen the same issue when testing this mapfile with OpenLayers):

 mapserv.exe -nh
 QUERY_STRING=map=c:/OSGeo4W/apache/htdocs/kevin/lst.mapmode=map 
 test.png

 My map file:

 MAP
    NAME LST
    SIZE 1440 720
    EXTENT -180 -90 180 90
    UNITS DD
    SHAPEPATH c:/OSGeo4W/apache/htdocs/kevin/
    IMAGECOLOR 255 255 255
    IMAGETYPE PNG
    STATUS ON
    DEBUG ON

    LAYER
        NAME LST
        TYPE RASTER
        STATUS DEFAULT
        DATA lst_1440.png
        OFFSITE 0 0 0
    END # LAYER
 END # MAP

 Any suggestions would be greatly appreciated. Thanks,

 Kevin

 --
 View this message in context: 
 http://osgeo-org.1803224.n2.nabble.com/subsetted-output-but-I-don-t-want-that-tp6979235p6979235.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] subsetted output, but I don't want that

2011-11-09 Thread Fawcett, David (MPCA)
In MapServer, if you set a MAP level projection and extent and don't specify a 
projection for a layer, MapServer assumes that the layer has the same 
projection as the MAP.

David.

-Original Message-
From: Kevin Ward [mailto:kablu...@gmail.com] 
Sent: Wednesday, November 09, 2011 1:47 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] subsetted output, but I don't want that

No, it's just a plain PNG. I was operating under the assumption that
the EXTENT and UNITS parameters in the mapfile would define the
coordinates of the source image but perhaps that is only constraining
the output?

If that is the case, how can I go about providing georeference for an
image such as that?

Kevin


___
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


RE: [mapserver-users] default values if not provided in the URL

2011-10-27 Thread Fawcett, David (MPCA)
Two hackish thoughts:

1.  Utilize a pair of mapfiles.  The first one has all of the classes on by 
default.  The second one has all of the class with STATUS OFF.  

On the client side, you determine if you have any class args and route the 
request to the appropriate mapfile. If the client has a request with class 
args, you append one of these for each class  'map.layer[0].class[3]=status 
on' (specifying the correct layer and class index values)

If you only had a few classes, you could easily manage this with one mapfile 
(without running up against the character limits on GET requests)

2.  What are you really trying to do?  It seem like classes are for selecting 
and symbolizing/formatting data for output.  Do you really want to filter out 
the data using a filter at the layer level.  If you can avoid running all of 
your data through the expressions for each class, it should perform better too.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Puneet Kishor
Sent: Thursday, October 27, 2011 10:50 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] default values if not provided in the URL

the fine manual says http://mapserver.org/cgi/runsub.html

 Since version 5.6, you can provide a default value for any substitution 
 parameter, that will be applied if the parameter was not found in the url. 
 You do this by providing special entries inside the layer metadata :

   METADATA
   'default_sound' 'yes'
   'default_nseats' '5'
   'default_multimedia' 'yes'
   END

 In this example, the mapfile will be created as if the url contained 
 sound=yesnseats=5multimedia=yes


Right then. Except, I want *all* my classes to be drawn if no class has been 
provided. And, if one or more classes have been provided, then I want only 
those to be drawn. So, 

http://server/mapfile?mode=map

should return a map with all the 100+ classes in a layer. And 

http://server/mapfile?mode=mapclasses=Foo,Bar

(or some other variation of the above) should return a map with only the 
requested classes in the layer. I can't think of anyway of doing the above 
without resorting to scripting, and I still have had no luck with WMS returned 
from Perl MapScripting.

Suggestions.

--
Puneet Kishor___
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] MS template file extensions

2011-10-26 Thread Fawcett, David (MPCA)
At the same time, I don't believe that a template will get handed off to the 
php, java, etc. engine after processing by MapServer.  

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Puneet Kishor
Sent: Wednesday, October 26, 2011 8:48 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] MS template file extensions


On Oct 26, 2011, at 8:33 AM, ni...@maich.gr wrote:

 Hello,
 
 Is there a way to allow ms templates with an arbitrary file extension?
 I see support in the template doc's for html, xml, jso...
 WHat if someone wanted to use a jsp page a php page or a tml page as a 
 template to gain server substitutin as well?
 

I believe there is no restriction (I use .mtt for map server template). You can 
choose whatever extension you like, or even have no extension if you wish.

--
Puneet Kishor

___
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] qlayer for multiple layers

2011-10-20 Thread Fawcett, David (MPCA)
I know that this is a simple question, but I can't find any confirmation.  

If I want to do a point query on multiple layers, I know that I can set all 
layer STATUS to DEFAULT.  

Is it possible to query some of the layers (status=ON) by identifying them in 
the URL.  For example, something like qlayer=layer1,layer2 or  
qlayerS=layer1+layer2?

I would like to be able to select a combination of layers ad hoc.

Thanks, 

David.

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


[mapserver-users] ticket for 'trimlast'?

2011-10-20 Thread Fawcett, David (MPCA)
I also can't get trimlast=',' to remove the trailing comma in a json formatted 
query result.  

[resultset layer=stations]
{
  stations: [
[feature trimlast=',']
{
  name: [NAME],
  stationId: [STATION_ID
},
[/feature]
  ]
}
[/resultset]

http://lists.osgeo.org/pipermail/mapserver-users/2011-September/070298.html

I searched for a trac ticket, but didn't see one.  I will file one if someone 
can confirm that this is still a real issue and that a ticket doesn't exist.

David.


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


RE: [mapserver-users] Chart Layers

2011-10-14 Thread Fawcett, David (MPCA)
I am guessing that this person is looking at layers of TYPE CHART.  
http://mapserver.org/output/dynamic_charting.html#dynamic-charting

I don't see any discussion of querying CHART layers in the above URL or in the 
section on TYPE in the LAYER docs:  http://mapserver.org/mapfile/layer.html

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jeff McKenna
Sent: Friday, October 14, 2011 7:11 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Chart Layers

On 11-10-13 6:29 PM, Eric Weisbender wrote:
 Is it possible to label and query a chart layer. If so how and is there
 documentation on this.
 Thanks
 EW



You can find s57 display notes for MapServer at: 
http://www.mapserver.org/input/vector/S57.html

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.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] gradient display of raster DEM data

2011-10-14 Thread Fawcett, David (MPCA)
John,

Take a look at the gdaldem utility.  http://www.gdal.org/gdaldem.html

You likely already have it on your machine already.

Aside from being able to generate data products like slope grids, it can 
produce hillshade images or color relief maps.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of John Callahan
Sent: Friday, October 14, 2011 3:56 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] gradient display of raster DEM data

I know this has been asked before but I thought I'd ask to see if anything 
changed.

I'm looking to display a raster digital elevation model in mapserver.  My data 
is in flat files, img and tiff.  I'd like to display this data as a continuous 
gradient color range, rather than using CLASS categories/bins for specific 
colors.  Is it still tru ethat this is not possible, easily?

One method (passed to me on this list) was too generate the colored image I 
want in another program, using GMT or similar tool, then use that in mapserver. 
 This seems like the best option but is non-trivial to someone who hasn't done 
this before.  (though not terribly difficult.)

I also read about the use of DATARANGE and COLORRANGE in mapserver.  However, 
these are not in the documentation.  Are these available in trunk only?  A 
ticket was generated that seems to say this will be included with MS 6.2.  
(http://trac.osgeo.org/mapserver/ticket/1305)  Any insight on whether this is 
still the plan?


Thanks for your help and advice.

- John

***
John Callahan, Research Scientist
Delaware Geological Survey, University of Delaware
URL: http://www.dgs.udel.edu
*
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Expressions on Cluster Objects

2011-10-12 Thread Fawcett, David (MPCA)
I have been playing around with the new cluster functionality a little bit.  

I am looking for way to classify the clusters based on their feature counts.  
E.g. larger circles for clusters of  10 features and even larger circles for 
clusters of  100 features.

Because Cluster:FeatureCount returns a string, the below expression can 
evaluate to True for values like 109

([Cluster:FeatureCount]  11)

Does anyone have any suggestions?

Maybe I am just misusing Clusters...

Thanks, 

David.

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


RE: [mapserver-users] Expressions on Cluster Objects

2011-10-12 Thread Fawcett, David (MPCA)
Thanks Tamas.

Here is the layer snippet:

LAYER
  NAME sites
  STATUS default
  DATA 'sites'
  TYPE POINT
  CLUSTER
 MAXDISTANCE 50
 REGION ellipse
  END
  LABELITEM Cluster:FeatureCount

  CLASS
 NAME small
 EXPRESSION ([Cluster:FeatureCount]  11)
 STYLE
COLOR 255 0 0
SYMBOL circle
SIZE 20
 END
 LABEL
   FONT arial
   TYPE TRUETYPE
   SIZE 8
   COLOR 255 255 255
 END
  END
CLASS
 NAME medium
 EXPRESSION ([Cluster:FeatureCount]  100)
 STYLE
COLOR 255 0 0
SYMBOL circle
SIZE 35
 END
 LABEL
   FONT arial
   TYPE TRUETYPE
   SIZE 8
   COLOR 255 255 255
 END
  END
CLASS
 NAME large
 STYLE
COLOR 255 0 0
SYMBOL circle
SIZE 50
 END
 LABEL
   FONT arial
   TYPE TRUETYPE
   SIZE 8
   COLOR 255 255 255
 END
  END
END

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tamas Szekeres
Sent: Wednesday, October 12, 2011 2:53 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Expressions on Cluster Objects

David,

I think that option should indeed work in the class expressions. Do you have a 
more complete example (map file)?

Best regards,

Tamas


2011/10/12 Fawcett, David (MPCA) 
david.fawc...@state.mn.usmailto:david.fawc...@state.mn.us
I have been playing around with the new cluster functionality a little bit.

I am looking for way to classify the clusters based on their feature counts.  
E.g. larger circles for clusters of  10 features and even larger circles for 
clusters of  100 features.

Because Cluster:FeatureCount returns a string, the below expression can 
evaluate to True for values like 109

([Cluster:FeatureCount]  11)

Does anyone have any suggestions?

Maybe I am just misusing Clusters...

Thanks,

David.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] Using a Symbol instead of text for a label

2011-09-28 Thread Fawcett, David (MPCA)
Matt,

I haven't fully thought it through, but maybe the new Cluster functionality 
might work for this.  You could have a generic park symbol for the cluster 
symbol.

http://mapserver.org/mapfile/cluster.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Matt McClelland
Sent: Tuesday, September 27, 2011 6:15 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Using a Symbol instead of text for a label

Hi

I have a bunch of symbols that overlap on a map.  EG at a park where I want to 
show an symbol for playground, toilet and picnic tables.  The data for each of 
these items are individual point data items.

I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a 
group
OR
Use the main symbol like a label.  So that I could have a dot where the play 
equipment is, then nearby have the symbol for the play equipment.  This is 
obviously very easy to do with text, but is it possible with a symbol??

I have tried this
   CLASS
  EXPRESSION /play|playground/
  NAME Children's Playground
  STYLE
SYMBOL 'waypoint'
color 255 0 0
SIZE 5
  END
  LABEL
 STYLE
  SYMBOL '/var/www/osm/kml/icons/play.png'
  Size 10
 END
 ...text styleing info
  END
   END

I get my 'waypoint' dot and the play.png in the same location.  I would like 
the play.png to be positioned AUTO like I can with text.
Any ideas??

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


RE: [mapserver-users] File Geodatabase - Feature Dataset

2011-09-23 Thread Fawcett, David (MPCA)
Craig, 

Do you have an instance of OGR that can read ESRI's proprietary File 
Geodatabase format?

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Craig Anderson
Sent: Friday, September 23, 2011 9:52 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] File Geodatabase - Feature Dataset

I have MANY ArcGIS 10 File Geodatabases whose data is organized into Feature
Datasets and I'd liketo be able to serve them upo as WMS/WFS services using
Mapserver:



How do I path to these vector data that are stored in feature datasets?

Niether of these work:

CONNECTIONTYPE OGR
CONNECTION ../data/HillsboroughBase.gdb/Cadastral
DATA Parcels
or
CONNECTIONTYPE OGR
CONNECTION ../data/HillsboroughBase.gdb
DATA Cadastral/Parcels

Any help would be appreciated.

Craig

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/File-Geodatabase-Feature-Dataset-tp6824494p6824494.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] Re: passing values to mapfile

2011-09-21 Thread Fawcett, David (MPCA)
http://mapserver.org/mapfile/class.html?highlight=validation

You need to set up a validation block with an expression that will match the 
value of the variable that you are passing through the GET request.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of jjwang
Sent: Wednesday, September 21, 2011 2:17 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Re: passing values to mapfile

I think I found out the problem. It seems not see the value in the url at
all.
Because if I give it a default value. The default value will work.
But I still don't know why and how to solve it.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815106.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] Image Pyramid with gdal_retile and two UTM zones

2011-09-20 Thread Fawcett, David (MPCA)
The problem is that both images are showing up in the same UTM Zone. A quick 
glance at the gdal_retile.py doc page indicates that all of the input tiles 
need to be in the same spatial reference system.

http://www.gdal.org/gdal_retile.html

I assume that you could reproject one of your tiles into the adjacent UTM Zone 
and then run gdal_retile, but I don't know if that would cause any distortion.  

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of aphunter
Sent: Tuesday, September 20, 2011 11:11 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones

Hello. I have a large raster mosaic and it is currently split into two zones.
UTM 10N and UTM 11N (Northern and Southern California). Currently, when I
use gdal_retile, the two zones sit next to each other. Is there some way I
can tile things so that the zones are on top of each other, and the state
looks complete?



http://osgeo-org.1803224.n2.nabble.com/file/n6812832/noalpha_m_3211401_ne_11_1_20090525_1_1.png
 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812832.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] RE: Image Pyramid with gdal_retile and two UTM zones

2011-09-20 Thread Fawcett, David (MPCA)
For performance, you will want the imagery pre-warped into one spatial 
reference system.  (The same SRS as your output SRS.)

I don't know if you will want the output SRS to be one of the two UTM Zones, or 
if you want to choose a different SRS.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of aphunter
Sent: Tuesday, September 20, 2011 11:41 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones

Thanks for the reply. Would it make more sense to create two pyramids and
then show two layers at the same time in mapserver?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812947.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] MapScript WMS request

2011-09-09 Thread Fawcett, David (MPCA)
Puneet, 

As far as I know, OpenLayers still has support for a layer based on MapServer 
CGI.  Because MapServer can also serve up WMS well, this layer type isn't 
necessarily recommended or as well supported.  

http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor
Sent: Thursday, September 08, 2011 9:32 PM
To: Daniel Morissette
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] MapScript WMS request


On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote:

 On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote:
 
 On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote:
 
 Maybe call $map-save(/tmp/my.map) in your script after the map and layer 
 have been populated and paste the result... that may give us a hint...
 
 
 wow! this is a super-awesome debugging technique. I have sent you the map 
 file off list to not pollute the entire list serve.
 
 
 I was able to reproduce the issue with the copy of the mapfile you sent 
 off-list.
 
 It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to 
 always return
 
 {minx = -2500, miny = -2500, maxx = 2500, maxy = 2500}
 
 ...and then it returns MS_SUCCESS.
 
 I think this function should either be left unimplemented (this way MapServer 
 would fallback on other mechanisms), or return MS_FAILURE to indicate to the 
 calling code that it didn't do anything useful.
 
 A quick search indicates an open ticket about the issue:
 
 http://trac.osgeo.org/mapserver/ticket/3585
 
 You could bump the ticket and hope someone works on it at the FOSS4G code 
 sprint next week.
 
 The short term fix for you would be to set the ows_extent metadata in your 
 layer:
 
METADATA
  ows_extent -180 -90 180 90
   ...
END
 


Thanks Daniel. I will bump the ticket. For now, see below --

Using the my.map file I sent you, with no further modifications to it, I am 
able to successfully get an image back via 
[http://localhost.local/cgi-bin/gmna?SERVICE=WMSVERSION=1.1.1REQUEST=GetMapBBOX=-180,-90,180,90SRS=EPSG:4326WIDTH=1200HEIGHT=600LAYERS=gmnaSTYLES=FORMAT=image/pngTRANSPARENT=true]

Note, no further modifications is required, that is, not even the ows_extent 
-180 -90 180 90 bit in the layer METADATA. and I still get a good image.


However, if I use the following program to access the same map file, I get the 
spurious minx = -2500, miny = -2500, maxx = 2500, maxy = 2500 
in the GetCapabilities.

Finally, if I add the ows_extent -180 -90 180 90 line in the layer METADATA 
in the my.map file, the GetCapabilities returns the correct bounds now, 
however, the image is still blank.

#!/opt/local/bin/perl

use strict;
use mapscript;

my $wms = new mapscript::OWSRequest();
$wms-setParameter(SERVICE, WMS );
$wms-setParameter(VERSION, 1.1.1 );
$wms-setParameter(REQUEST, GetMap );
$wms-setParameter(BBOX, -180,-90,180,90 );
$wms-setParameter(LAYERS, gmna);
$wms-setParameter(SRS, EPSG:4326);
$wms-setParameter(WIDTH, 1200);
$wms-setParameter(HEIGHT, 600);
$wms-setParameter(FORMAT, image/png);
$wms-setParameter(TRANSPARENT, true);

my $map = new 
mapscript::mapObj(/Users/punkish/Sites/test/mapscript/my.map);

if(!$map) {
warn New mapObj() error: $mapscript::ms_error-{message}\n;
}

my $io = mapscript::msIO_installStdoutToBuffer();
my $dispatch_out = $map-OWSDispatch( $wms );
printf %s\n, mapscript::msIO_getStdoutBufferString();

I have now spent an enormous amount of time on this, and for now, I have to 
move on. This is just not working out. Maybe I will try some other technique, 
perhaps this mode=tile to see if I can get MapServer powered maps in my apps.

Thanks much for your help. If you (or anyone else) can come up with a bright 
idea, I will be happy to try it.

Puneet.

___
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] MapScript WMS request

2011-09-09 Thread Fawcett, David (MPCA)
Puneet, 

Using MapServer CGI and layer.MapServer would not set you up well for other 
client libraries, so I see your point.  It can be viable though.

In this app (just an imagemap, not OL), there are no attribute values 
associated with the spatial data.  The classes are generated on-the-fly and the 
county id's for each class are passed in as URL vars.  Same thing for the 
legend.  This allows flexibility for compounds who's emissions may vary from 
tens of pounds to millions of pounds.

This approach may not work for your case, but it is another way to slice it...

http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor
Sent: Friday, September 09, 2011 9:35 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] MapScript WMS request


On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote:

 Puneet, 
 
 As far as I know, OpenLayers still has support for a layer based on MapServer 
 CGI.  Because MapServer can also serve up WMS well, this layer type isn't 
 necessarily recommended or as well supported.  
 
 http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html



Indeed David. Because, going by the docs, the MapServer CGI calls are 
discouraged (or so it seems), I'd rather not invest in that path. This is a 
long term project that I am working on, so the foundations have to be very 
robust. Besides, I may or may not use OL. While I like OL a lot, I am also 
looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise to 
decouple the backend from the front-end as much as possible.

I have no issues with using WMS, but I just am unable to get MapServer WMS to 
work via MapScript. And, yes, I do have to use MapScript if I can help it -- my 
layer classification is generated on demand, and MapScript is the easiest way I 
can think of for doing that.

I did find yesterday that `mode=tile` works really well, but I am trying to 
make that work with MapScript. A separate email thread for that question.




 
 David.
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet 
 Kishor
 Sent: Thursday, September 08, 2011 9:32 PM
 To: Daniel Morissette
 Cc: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapScript WMS request
 
 
 On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote:
 
 On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote:
 
 On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote:
 
 Maybe call $map-save(/tmp/my.map) in your script after the map and 
 layer have been populated and paste the result... that may give us a 
 hint...
 
 
 wow! this is a super-awesome debugging technique. I have sent you the map 
 file off list to not pollute the entire list serve.
 
 
 I was able to reproduce the issue with the copy of the mapfile you sent 
 off-list.
 
 It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to 
 always return
 
 {minx = -2500, miny = -2500, maxx = 2500, maxy = 2500}
 
 ...and then it returns MS_SUCCESS.
 
 I think this function should either be left unimplemented (this way 
 MapServer would fallback on other mechanisms), or return MS_FAILURE to 
 indicate to the calling code that it didn't do anything useful.
 
 A quick search indicates an open ticket about the issue:
 
 http://trac.osgeo.org/mapserver/ticket/3585
 
 You could bump the ticket and hope someone works on it at the FOSS4G code 
 sprint next week.
 
 The short term fix for you would be to set the ows_extent metadata in your 
 layer:
 
   METADATA
 ows_extent -180 -90 180 90
  ...
   END
 
 
 
 Thanks Daniel. I will bump the ticket. For now, see below --
 
 Using the my.map file I sent you, with no further modifications to it, I am 
 able to successfully get an image back via 
 [http://localhost.local/cgi-bin/gmna?SERVICE=WMSVERSION=1.1.1REQUEST=GetMapBBOX=-180,-90,180,90SRS=EPSG:4326WIDTH=1200HEIGHT=600LAYERS=gmnaSTYLES=FORMAT=image/pngTRANSPARENT=true]
 
 Note, no further modifications is required, that is, not even the 
 ows_extent -180 -90 180 90 bit in the layer METADATA. and I still get a 
 good image.
 
 
 However, if I use the following program to access the same map file, I get 
 the spurious minx = -2500, miny = -2500, maxx = 2500, maxy = 
 2500 in the GetCapabilities.
 
 Finally, if I add the ows_extent -180 -90 180 90 line in the layer 
 METADATA in the my.map file, the GetCapabilities returns the correct bounds 
 now, however, the image is still blank.
 
   #!/opt/local/bin/perl
   
   use strict;
   use mapscript;
   
   my $wms = new mapscript::OWSRequest();
   $wms-setParameter(SERVICE, WMS );
   $wms

RE: [mapserver-users] MapScript WMS request

2011-09-09 Thread Fawcett, David (MPCA)
DNS issue, should be fixed by Monday...   ; ('

-Original Message-
From: Mr. Puneet Kishor [mailto:punk.k...@gmail.com] 
Sent: Friday, September 09, 2011 10:00 AM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] MapScript WMS request

David,


On Sep 9, 2011, at 9:47 AM, Fawcett, David (MPCA) wrote:

 Puneet, 
 
 Using MapServer CGI and layer.MapServer would not set you up well for other 
 client libraries, so I see your point.  It can be viable though.
 
 In this app (just an imagemap, not OL), there are no attribute values 
 associated with the spatial data.  The classes are generated on-the-fly and 
 the county id's for each class are passed in as URL vars.  Same thing for the 
 legend.  This allows flexibility for compounds who's emissions may vary from 
 tens of pounds to millions of pounds.
 
 This approach may not work for your case, but it is another way to slice it...


Possibly. See, it is crucially important for me to be able to generate classes 
on the fly, and with a lot of flexibility. Not just that, the criteria for 
generating the classes can change. So, what I am doing actually is setting up a 
separate application that does nothing but respond with class information. The 
mapping application (and, any other application, for that matter), would query 
this class generating application and make the classes as per the latest 
information. Hence, my need for MapScripting. Well, there are other reasons as 
well, but this is an important one.


 
 http://www.pca.state.mn.us/index.php/topics/environmental-data/eda-environmental-data-access/eda-air-quality-searches/eda-air-quality-search-emissions-by-county-data.html



By the way, the app above is not working. I get broken images, and the 
following errors in the web inspector (that might help you troubleshoot)


GET http://www.pca.state.mn.us/oea/css/master.css 404 (Not Found)

emissions.cfm:28 ReferenceError: Can't find variable: urchinTracker

GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the 
specified hostname could not be found.

GET http://maps.pca.state.mn.us/cgi-bin/mapserv? ..snipped.. A server with the 
specified hostname could not be found.

GET 
http://cf.pca.state.mn.us/data/edaAir/artwork/edaP2results_edaAmbientResultsPollutantsJuly_04.gif
 404 (Not Found)

master-print.cssGET http://www.pca.state.mn.us/oea/css/master-print.css 404 
(Not Found)




 
 David.
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet 
 Kishor
 Sent: Friday, September 09, 2011 9:35 AM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapScript WMS request
 
 
 On Sep 9, 2011, at 8:39 AM, Fawcett, David (MPCA) wrote:
 
 Puneet, 
 
 As far as I know, OpenLayers still has support for a layer based on 
 MapServer CGI.  Because MapServer can also serve up WMS well, this layer 
 type isn't necessarily recommended or as well supported.  
 
 http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapServer-js.html
 
 
 
 Indeed David. Because, going by the docs, the MapServer CGI calls are 
 discouraged (or so it seems), I'd rather not invest in that path. This is a 
 long term project that I am working on, so the foundations have to be very 
 robust. Besides, I may or may not use OL. While I like OL a lot, I am also 
 looking at other frameworks (Gmaps, Leaflet, Polymaps), and it would be wise 
 to decouple the backend from the front-end as much as possible.
 
 I have no issues with using WMS, but I just am unable to get MapServer WMS to 
 work via MapScript. And, yes, I do have to use MapScript if I can help it -- 
 my layer classification is generated on demand, and MapScript is the easiest 
 way I can think of for doing that.
 
 I did find yesterday that `mode=tile` works really well, but I am trying to 
 make that work with MapScript. A separate email thread for that question.
 
 
 
 
 
 David.
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet 
 Kishor
 Sent: Thursday, September 08, 2011 9:32 PM
 To: Daniel Morissette
 Cc: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapScript WMS request
 
 
 On Sep 8, 2011, at 8:28 PM, Daniel Morissette wrote:
 
 On 11-09-08 09:02 PM, Mr. Puneet Kishor wrote:
 
 On Sep 8, 2011, at 7:43 PM, Daniel Morissette wrote:
 
 Maybe call $map-save(/tmp/my.map) in your script after the map and 
 layer have been populated and paste the result... that may give us a 
 hint...
 
 
 wow! this is a super-awesome debugging technique. I have sent you the map 
 file off list to not pollute the entire list serve.
 
 
 I was able to reproduce the issue with the copy of the mapfile you sent 
 off-list.
 
 It turns out that mappostgis.c's msPostGISLayerGetExtent() is hardcoded to 
 always return
 
 {minx = -2500, miny

RE: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this case?

2011-09-08 Thread Fawcett, David (MPCA)
Have you looked at this page in the documentation?

http://mapserver.org/mapfile/expressions.html#arithmetic-operations-and-functions-that-return-a-number

You should be able to do this.  You wouldn't use a CLASSITEM, just an 
expression.  

Create individual classes for green, yellow, and red.  

The expression for green would be something  like:

EXPRESSION ([PopulationOver65] / [PopulationTotal] * 100  10)

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of jjwang
Sent: Thursday, September 08, 2011 12:47 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] how to define the CLASSITEM and EXPRESSION in this 
case?

I want to define classes according to the proportion between two attributes
of the feature.
How to do this?
For example: feature has two attributes 'PopulationOver65' and
'PopulationTotal'. They are both numbers.
I want the color of this feature:
green if PopulationOver65/PopulationTotal 10%,
yellow if 10% -30%,
red if 30%.

Anyway to do this?

JJ

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/how-to-define-the-CLASSITEM-and-EXPRESSION-in-this-case-tp6770598p6770598.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] Map size question?

2011-08-18 Thread Fawcett, David (MPCA)
Chris,

If you are in tile mode, I assume that you probably don't want an embedded 
legend on each tile.

Have you thought about doing a separate call/request/object for the legend?

If you were doing this via CGI, I would recommend doing a separate mode=legend 
request.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green
Sent: Thursday, August 18, 2011 12:04 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Map size question?

After quite a while thinking I could not produce a legend I have realised that 
the legend is actually there, just off the edge of my map.

Now I see that although my map file specifies a map size of 640 x 480 pixels, 
if in single tile mode the map image being produced is actually  1110 x 660 
pixels. Alternatively with multiple tiles I get 12 tiles of 250 x 250 pixels 
which is 1024 x 768 pixels.

It seems that the size parameter in the map file is being ignored (even setting 
the values to 0 0 or omitting the SIZE parameter altogether makes no 
difference). MAXSIZE doesn't seem to help either.

I can't find a way to get the image size that I want, can anyone help?



Chris



From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green
Sent: 18 August 2011 08:02
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] mapsript legend

Hi all

I have a map created via Mapscript under Mapserver 6.0 but I can't find a way 
to add a legend. Recent examples are hard to find but I found the following 
dating from 2002 which seemed simple enough:


  $legend = $map-legend;
  $legend-set(width,40);
  $legend-set(height,100);
  $legend-imagecolor-setRGB(240,220,200); # tan
  $legend-outlinecolor-setRGB(1,1,1); # black
  $legend-set(status, MS_EMBED);
  $legend-set(position, MS_UL);
  // SET LEGEND LABEL PROPERTIES
  $lg_label = $legend-label;
  $lg_label-set(font, arial);
  $lg_label-set(type, MS_TRUETYPE);
  $lg_label-set(size, 10);
  $lg_label-set(minsize, 6);
  $lg_label-set(maxsize, 12);
  $lg_label-color-setRGB(100,100,100);
  $legend-set(postlabelcache, MS_TRUE);
  // DRAW LEGEND
  $legendImage=$map-drawLegend();

Unfortunately this produces no output. Can anyone give me any clues why?


Chris

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


RE: [mapserver-users] free multilayer GIS data

2011-08-17 Thread Fawcett, David (MPCA)
For data at a smaller scale, you may also want to look at the Natural Earth 
data sets.  Raster and vector, clean data, with attributes, liberal (Public 
Domain) license.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Wim Vanbelle
Sent: Wednesday, August 17, 2011 7:25 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] free multilayer GIS data

I'd start here:

http://downloads.cloudmade.com/

And then look for additional data in the OpenStreetMap project.

On top of those, googling around for 'open data' also comes up with a lot of 
info :).


On 17 August 2011 12:55, Esmin Gracić 
esmin.gra...@gmail.commailto:esmin.gra...@gmail.com wrote:
Hi all,

I need to make a presentation on free gis stack (apache phpmapscript pg 
pgrouting) to some interested party.

My question is do you know where I could get some nice free GIS data with 
multiple layers like roads (to build pgrouting stuff on), houses, objects, 
gasline, powerline, optical cables, water etc...
This is for demo only, so area does not have to more than 1km2.

Pointing in right direction, would be helpful, too.

Thanks, Esmin.




___
mapserver-users mailing list
mapserver-users@lists.osgeo.orgmailto: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] PDF Generation - file suffix?

2011-08-17 Thread Fawcett, David (MPCA)
I don't want to pollute Jukka's thread about large .pdf creation, so I am 
forking it.  

The .pdf file generated by his request renders fast and looks nice, but the 
file doesn't have a .pdf suffix.  This confused my browser and didn't 
automatically associate the file with Acrobat Reader.  

This isn't a huge issue for me as a user, but if I am developing something for 
a more general audience, it will be a problem.  

Is there a way to ensure that the generated .pdf has the correct file suffix?

http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=864HEIGHT=662LAYERS=defaultTRANSPARENT=TRUEFORMAT=application/x-pdfBBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395SRS=EPSG:2393STYLES=


David.



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


RE: [mapserver-users] Web application error. Malformed template name

2011-08-16 Thread Fawcett, David (MPCA)
Dara,

Can you share the part of your mapfile that describes this layer?

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Dara Olson
Sent: Tuesday, August 16, 2011 9:01 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Web application error. Malformed template name

Good morning. I am having some problems identifying a layer through MapServer 
and I seem to be stuck.

I have a flat table of harvest by waterbody by year by individual in 
PostgreSQL/PostGIS. I created a temporary view of the sum harvested by 
waterbody by year and joined in geometry which I then made into a crosstab so 
that each lake would be listed and columns across with harvest by year.  It 
draws successfully in my web mapping application (and view looks fine in 
postgres), but when I try to use the Identify feature on the website (Mapserver 
GET URL request) I get the following error in MapServer,

[Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. 
Malformed template name ().
[Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. 
No matching record(s) found.

Before doing the crosstab I was getting this error, but I assumed that it 
didn't like the multiple records linked to the same geometry and that's why I 
did the crosstab.  But still nothing works.

Does anyone have any idea of where to begin to debug?  Any help would be 
greatly appreciated.
Thanks!
Dara Olson, GLIFWC
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Web application error. Malformed template name

2011-08-16 Thread Fawcett, David (MPCA)
Dara,

I am pretty sure that relative paths work for templates, but for testing 
purposes, try using the absolute path to the template.

David.

From: Dara Olson [mailto:dol...@glifwc.org]
Sent: Tuesday, August 16, 2011 10:03 AM
To: Fawcett, David (MPCA); mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Web application error. Malformed template name

It is below.  I am running a web mapping site with GeoMoose(2.0) and 
MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing 
wrong or why I am ending up with the error. Any help would be greatly 
appreciated.
Miigwech!
Dara

MAP
SIZE 1920 1920
MAXSIZE 1
EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617
UNITS meters
SYMBOLSET ..\symbols\glifwc_symbol.sym
FONTSET ..\fonts\fonts.list
CONFIG  MS_ERRORFILE d:/Logs/Mapserver/MapServerDEVELSITE.log

OUTPUTFORMAT
 NAME 'agg/png'
 DRIVER AGG/PNG
 IMAGEMODE RGBA
 FORMATOPTION TRANSPARENT=TRUE
END

IMAGETYPE AGG/PNG
TRANSPARENT ON
IMAGECOLOR -1 -1 -1

DEBUG 3

###  LEGEND  ###

 LEGEND
   STATUS on
   TRANSPARENT on
 END

###  Map projection  
###

 PROJECTION
  init=epsg:900913
 END

###  LAYERS  ###

LAYER #  MN Ogaa Harvest LBS
NAME mn_ogaa_harvest_lbs
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION host=zzz user=zz password=zz dbname=zz
PROCESSING CLOSE_CONNECTION=DEFER
DATA the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using unique 
new_id using srid=900913
PROJECTION
init=epsg:900913
END
METADATA
wms_title MN Ogaa Harvest Lakes
END
CLASS
NAME MN Ogaa Harvest Lakes
STYLE
SYMBOL 0
SIZE 6
OUTLINECOLOR -1 -1 -1
COLOR 182 177 145
END
TEMPLATE ../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html
END
END # MN Ogaa Harvest LBS

END #map file

My HTML identify template used to display results is,

!-- MapServer Template--
tbody
tr
th colspan=2MN Ogaa Harvest in Pounds/th
/tr
tr
td align=leftLake:/td
td[lake]/td
/tr
tr
td align=left2011 Harvest:/td
td[_2011_harvest]/td
/tr
...
/tbody
trtd colspan=2hr/td/tr

- Original Message -
From: Fawcett, David (MPCA)mailto:david.fawc...@state.mn.us
To: Dara Olsonmailto:dol...@glifwc.org ; 
mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Sent: Tuesday, August 16, 2011 9:42 AM
Subject: RE: [mapserver-users] Web application error. Malformed template name

Dara,

Can you share the part of your mapfile that describes this layer?

David.

From: 
mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Dara Olson
Sent: Tuesday, August 16, 2011 9:01 AM
To: mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Web application error. Malformed template name

Good morning. I am having some problems identifying a layer through MapServer 
and I seem to be stuck.

I have a flat table of harvest by waterbody by year by individual in 
PostgreSQL/PostGIS. I created a temporary view of the sum harvested by 
waterbody by year and joined in geometry which I then made into a crosstab so 
that each lake would be listed and columns across with harvest by year.  It 
draws successfully in my web mapping application (and view looks fine in 
postgres), but when I try to use the Identify feature on the website (Mapserver 
GET URL request) I get the following error in MapServer,

[Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. 
Malformed template name ().
[Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. 
No matching record(s) found.

Before doing the crosstab I was getting this error, but I assumed that it 
didn't like the multiple records linked to the same geometry and that's why I 
did the crosstab.  But still nothing works.

Does anyone have any idea of where to begin to debug?  Any help would be 
greatly appreciated.
Thanks!
Dara Olson, GLIFWC
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] runtime substitution - class name

2011-08-16 Thread Fawcett, David (MPCA)
Is it still possible to runtime-sub a class name in 6.0.1?

I used to do it like this in 4.x:
http://myserver/cgi-bin/mapserv?mode=legendmap=mymap.mapmap_basemap_class_0_name=fitger

I am trying to do it like this in 6.0.1:
http://myserver/cgi-bin/mapserv?mode=mapmap=/web/mymap.mapmap.layer[0].class[1]=NAME+%27fitger%27

I get this error message:

loadClass(): Unknown identifier. Parsing error near (NAME):(line 1)

I have attempted to use a validation block also, but can't find an example of 
what key name to use for map objects (e.g. class name)



Thanks, 

David.



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


[mapserver-users] RE: runtime substitution - class name

2011-08-16 Thread Fawcett, David (MPCA)
OK, 

As usual, the best method in debugging is to post to the list and then give it 
one last try...

At 6.X, you can't change the name properties of classes, layers, etc.  Steve 
Lime documents this pretty clearly in this email message:  
http://lists.osgeo.org/pipermail/mapserver-users/2011-April/068560.html

The TITLE property is now accessible though.  I had tried this, but not 
apparently at the same time that I was applying a validation pattern.  

This URL works:  
http://myserver/cgi-bin/mapserv?mode=legendmap=mymap.mapmap.layer[0].class[1]=TITLE+%27fitger%27

I have a layer-level validation block.  The expression is a little more 
generous than my test case needs, but fits the real data.

  VALIDATION
'title' '^[a-zA-Z0-9\, ]+$'
  END

David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Fawcett, David 
(MPCA)
Sent: Tuesday, August 16, 2011 3:05 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] runtime substitution - class name

Is it still possible to runtime-sub a class name in 6.0.1?

I used to do it like this in 4.x:
http://myserver/cgi-bin/mapserv?mode=legendmap=mymap.mapmap_basemap_class_0_name=fitger

I am trying to do it like this in 6.0.1:
http://myserver/cgi-bin/mapserv?mode=mapmap=/web/mymap.mapmap.layer[0].class[1]=NAME+%27fitger%27

I get this error message:

loadClass(): Unknown identifier. Parsing error near (NAME):(line 1)

I have attempted to use a validation block also, but can't find an example of 
what key name to use for map objects (e.g. class name)



Thanks, 

David.



___
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] WFS Spatial Filter Problem

2011-08-09 Thread Fawcett, David (MPCA)
Bryan,

For testing, I would enable debugging at the MAP or LAYER level.  If you set 
DEBUG 5, I think that you should be able to see the query that MapServer is 
crafting.

More on debugging here:  
http://mapserver.org/optimization/debugging.html#debugging

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
Sent: Tuesday, August 09, 2011 4:15 AM
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] WFS Spatial Filter Problem

Dear Kai and Assefa,



After you two guys requested me to send you my setup, I exported the content in 
the databasetable to a shapefile so you can test it. When I tested the spatial 
filter right after that, it suddenly worked ! This narrows down the 
possibilities:

- The request I send is definitely not the problem anymore. It works with 
MapServer + shapefile and with GeoServer.

- I exported only the geometries to the shapefile in the table with 
geometrytype = POLYGON because from ~8000 geometries ~10 are linestrings. So I 
investigated possible problems with the linestring geometries by telling the 
MapServer not to serve them using a subquery in the mapfile:

DATA the_geom from (select * from alldata where geometrytype(the_geom) = 
'POLYGON') as subquery using unique product_id using SRID=4326

Error 500 still occured. Therefore, the data can't be the problem neither, 
right?

- Since I didn't change anything else MapServer must have problems 
communicating with the PostGIS database, but why Error 500 then?

Here is my mapfile:


MAP
NAME WFS Server
STATUS ON
SIZE 600 400
SYMBOLSET /var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH /var/www/html/psa/bhempen/mapservertest/data/
IMAGECOLOR 255 255 255
FONTSET /var/www/html/psa/bhempen/mapservertest/fonts/fonts.list
MAXSIZE 4096 # needs to be set because otherwise an error will appear when 
rendering images on large screens


#IMAGECOLOR 200 200 200 #commented out for WFS

PROJECTION
   'init=epsg:4326'
END

WEB
TEMPLATE  '/var/www/html/psa/bhempen/mapservertest/template.html'
IMAGEPATH '/var/www/html/psa/bhempen/tmp/'
IMAGEURL  '/psa/bhempen/tmp/'
  METADATA
wfs_title  WFS Demo Server for MapServer ## 
REQUIRED
wfs_onlineresource 
http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map;http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map;
 ## Recommended
wfs_srsEPSG:4326 ## Recommended
wfs_abstract   This text describes my WFS service. 
## Recommended
  END
END

LAYER
NAME   omega
STATUS   DEFAULT
TYPE POLYGON
METADATA
wfs_title omega footprints ##REQUIRED
wfs_srs   EPSG:4326 ## REQUIRED
   gml_include_items all ## Optional (serves all attributes for 
layer)
gml_featureid product_id ## REQUIRED
END
PROJECTION
init=epsg:4326
END
CONNECTIONTYPE POSTGIS
CONNECTION host=localhost port=xxx dbname=xxx user=xxx password=xxx
DATA the_geom from alldata using unique product_id using SRID=4326
CLASS
STYLE
OUTLINECOLOR125 0 0
END
END
DUMP TRUE ## REQUIRED
END # layer

END


Does anyone see a problem with the setup?

Many thanks to Kai and Assefa for the help so far! I am going to send you the 
shapefile (which you could import into the database with pgsql2shp), the 
mapfile, and my client.

Kind regards,
Bryan



This message and any attachments are intended for the use of the addressee or 
addressees only. The unauthorised disclosure,



use, dissemination or copying (either in whole or in part) of its content is 
not permitted. If you received this message in



error, please notify the sender and delete it from your system. Emails can be 
altered and their integrity cannot be guaranteed by



the sender.



Please consider the environment before printing this email.

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


RE: [mapserver-users] Plotting points as a line from sqlite database

2011-07-28 Thread Fawcett, David (MPCA)
Ian, 

Take a look at 2.4.0-RC5

http://www.gaia-gis.it/spatialite-2.4.0-5/spatialite-sql-2.4-5.html#p5

Look under SQL utility functions [non-standard] for geometric objects

David.

-Original Message-
From: Ian Walberg [mailto:ian.walb...@airborne.aero] 
Sent: Thursday, July 28, 2011 12:41 PM
To: Fawcett, David (MPCA); Stephen Woodbridge; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Plotting points as a line from sqlite database

Gents,

Thanks for these ideas, however I cannot seem to find a MakeLine
function in spatialite 2.4.0.

Where should I be looking?

Thanks

Ian

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Fawcett,
David (MPCA)
Sent: Thursday, June 30, 2011 6:44 AM
To: Stephen Woodbridge; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Plotting points as a line from sqlite
database

ST_MAKELINE() does exist in recent versions of Spatialite.  

It doesn't appear to have made it in to the docs, but it can be seen in
this example from the cookbook.
http://www.gaia-gis.it/spatialite-2.4.0-4/spatialite-cookbook/html/pp-ad
jacent.html

Another example is in this thread from the Spatialite list:  

http://groups.google.com/group/spatialite-users/browse_thread/thread/002
0f8e907ae9226

You will likely need recent versions of both Spatialite and OGR to make
it work.

David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen
Woodbridge
Sent: Wednesday, June 29, 2011 10:49 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Plotting points as a line from sqlite
database

On 6/29/2011 10:13 PM, Ian Walberg wrote:
 I hope this isn't too stupid a question.

 Would like to display a list of positions in an sqlite database as a
 line, to show the flight path of an aircraft. The data is in the db as
 Lat, Long and point (lat, long)

 We can display the positions as individual dots but not as a line, I
 fear the problem is that the data is a point.

 As the data is being accumulated we would prefer not to create a new
 line in the database each time if possible.

 Any suggestions to what options we have would be appreciated.

Hi Ian,

In postgis there is an aggregrate function makeline() that you can feed 
points to. I think there may be an equivalent function in SpatiaLite.

In sqlite, you might be able to use a group_concat() something like:

select 'LINESTRING('|| group_concat(lat||' '||long, ',') ||')'
   from points;

But I think the issue will be that this is not a format that mapserver 
understands. You might be able to access this via GDAL/OGR but I'm not 
sure on that.

-Steve W
___
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 mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] diffferent map image size for different layer

2011-07-21 Thread Fawcett, David (MPCA)
I assume that you could handle it on the client side by adjusting your calls to 
mapserver based on which layers you have selected.

e.g. layer=riversimgsize=200+200

or   layer=lakesimgsize=1000+1000

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of ahmet temiz
Sent: Thursday, July 21, 2011 7:05 AM
To: mapserver-users
Subject: [mapserver-users] diffferent map image size for different layer

hello

I was wondering if I could use different map image size for different layer.

Such as :

layer1 size 600*400
layer2 size 1200*800

Is it possible ?
regards


-- 
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Planlama ve Zarar Azaltma Dairesi Başkanlığı
Bilgi ve CBS grubu
Eskişehir Yolu 10. km.
Lodumlu / Ankara
Tel : 0 312 2872680 / 1535


Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
___
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] Plotting points as a line from sqlite database

2011-06-30 Thread Fawcett, David (MPCA)
ST_MAKELINE() does exist in recent versions of Spatialite.  

It doesn't appear to have made it in to the docs, but it can be seen in this 
example from the cookbook.  
http://www.gaia-gis.it/spatialite-2.4.0-4/spatialite-cookbook/html/pp-adjacent.html

Another example is in this thread from the Spatialite list:  

http://groups.google.com/group/spatialite-users/browse_thread/thread/0020f8e907ae9226

You will likely need recent versions of both Spatialite and OGR to make it work.

David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge
Sent: Wednesday, June 29, 2011 10:49 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Plotting points as a line from sqlite database

On 6/29/2011 10:13 PM, Ian Walberg wrote:
 I hope this isn't too stupid a question.

 Would like to display a list of positions in an sqlite database as a
 line, to show the flight path of an aircraft. The data is in the db as
 Lat, Long and point (lat, long)

 We can display the positions as individual dots but not as a line, I
 fear the problem is that the data is a point.

 As the data is being accumulated we would prefer not to create a new
 line in the database each time if possible.

 Any suggestions to what options we have would be appreciated.

Hi Ian,

In postgis there is an aggregrate function makeline() that you can feed 
points to. I think there may be an equivalent function in SpatiaLite.

In sqlite, you might be able to use a group_concat() something like:

select 'LINESTRING('|| group_concat(lat||' '||long, ',') ||')'
   from points;

But I think the issue will be that this is not a format that mapserver 
understands. You might be able to access this via GDAL/OGR but I'm not 
sure on that.

-Steve W
___
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-wrong results in IE8 if zoomsize is not 100%

2011-06-29 Thread Fawcett, David (MPCA)
This sounds like a client issue, not a MapServer issue.  What client are you 
using?

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tipatino
Sent: Wednesday, June 29, 2011 1:26 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Query-wrong results in IE8 if zoomsize is not 100%

Hi folks,

a query at a point-shapefile gives unexpected results such as
msQueryByPoint(): Search returned no results. No matching record(s) found
if the zoom size of the Internet Explorer (8) is different then 100%. It
seems like the coordinates you hit are different to the ones the MapServer
is processing. This does not occur with Browsers like firefox. Any
possibilities to avoid that ? Sorry if this is posted before - I just didn't
find it. I use version 5.6.1

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Query-wrong-results-in-IE8-if-zoomsize-is-not-100-tp6530144p6530144.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] RE: Query-wrong results in IE8 if zoomsize is not 100%

2011-06-29 Thread Fawcett, David (MPCA)
I can reproduce it in both IE8 and FF3.  Not sure what the issue is.  I 
switched to the townships layer to make sure that it wasn't a tolerance issue 
in querying a point feature.

Obviously, they guy who built this page knows nothing about MapServer   ; /

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Tipatino
Sent: Wednesday, June 29, 2011 2:12 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: Query-wrong results in IE8 if zoomsize is not 
100%

Hi David

thanks for the message, its just within a simple html page. However, the
same things happens for example with the airports in the well known  ITASCA
example
(http://maps.dnr.state.mn.us/cgi-bin/mapserv54?img.x=332img.y=130mode=browselayer=airportszoomdir=0zoomsize=2imgxy=300.0+300.0imgext=388201.781900+5200193.595290+500990.486520+5312982.299910map=%2Fusr%2Flocal%2Fwww%2Fdocs_maps%2Fmapserver_demos%2Fworkshop-5.4%2Fitasca.maproot=%2Fmapserver_demos%2Fworkshop-5.4savequery=trueprogram=%2Fcgi-bin%2Fmapserv54map_web=+TEMPLATE+itasca_basic.html)
  
I would be curious to know if you can reproduce it ...

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Query-wrong-results-in-IE8-if-zoomsize-is-not-100-tp6530144p6530337.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] color standards in layers

2011-06-24 Thread Fawcett, David (MPCA)
You may also want to look at ColorBrewer:  http://colorbrewer2.org/

It is very useful in helping you decide on color themes for maps.  It will also 
provide you with the color codes (RGB or Hex) that you can use directly in 
MapServer.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge
Sent: Thursday, June 23, 2011 7:03 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] color standards in layers

On 6/23/2011 6:27 PM, Paul Alarcon wrote:
 Hello evryone i'm a mapserver user, i love the way i work, but i have a
 question i'm not a GIS Specialyst, but i want to know if there is color
 ruler for the representation of the layers,because i want to follow the
 goegraphic rules, some information about it i really apreciate.

Hi Paul,

There has been a lot written on this subject and there is probably not 
simple answer because to a large extent it depends on what you are 
trying to show with you map.

A lot of people like the Google maps or Virtual Earth maps as color 
schemes. You might also find the following interesting reading:

http://www.google.com/#q=cartographic+color+standards+for+maps

There are some very good books on the subject that discuss this in 
detail you can enter gis cartography into amazon book search to a good 
sample of them.

Hope this helps,
   -Steve W
___
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] Mapserver 6.0 WMS

2011-06-16 Thread Fawcett, David (MPCA)
Chris,

I can't find that ticket either, but this should help.

Look at:  http://mapserver.org/MIGRATION_GUIDE.html#ogc-web-services

And this:  http://mapserver.org/development/rfc/ms-rfc-67.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Chris Green
Sent: Thursday, June 16, 2011 1:43 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Mapserver 6.0 WMS

Hi List

I am in the process of upgrading from Mapserver 5.4 to 6.0 , running under 
Ubuntu 10.04. However I am struggling with the more stringent requirements in 
Mapserver 6.0 when running as a WMS server. I can see the principles applied in 
 http://mapserver.org/MIGRATION_GUIDE.html#migration, but can't find  ticket 
1088 or any other documentation to show me how to ensure that the various 
parameters like FORMAT and STYLES are delivered in the way that Mapserver 6.0 
now requires before it will accept a GetMap request.

As things stand I can't get past the error message msWMSGetCapabilities(): WMS 
server error. WMS request not enabled. Check wms/ows_enable_request settings

Can someone point me in the right direction here?



Chris

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


RE: [mapserver-users] Simple mapserver HTML template file?

2011-06-09 Thread Fawcett, David (MPCA)
If you aren't querying, you shouldn't need a template.  All that you should 
need is a map/layer that can be served as a WMS.  OpenLayers and the HTML page 
that you create to contain the OpenLayers map handle the layout.  

You could start with a really simple example like this and point it at your 
WMS.  http://dev.openlayers.org/releases/OpenLayers-2.10/examples/lite.html

David.

-Original Message-
From: Gerry Creager [mailto:gerry.crea...@tamu.edu] 
Sent: Thursday, June 09, 2011 10:50 AM
To: Fawcett, David (MPCA)
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Simple mapserver HTML template file?

I'm looking at that now. I need to understand the TEMPLATE element in 
the LAYER section, though. I created the basic mapfile using Qgis, and 
it's got a dummy value there.

gc

Fawcett, David (MPCA) wrote:
 Gerry, 
 
 I would really look at OpenLayers on the client side and MapServer WMS on the 
 server side.
 
 You could probably tweak one of the basic examples and have it up and running 
 in about 15 minutes.
 
 David.
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Gerry Creager
 Sent: Thursday, June 09, 2011 9:38 AM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] Simple mapserver HTML template file?
 
 I've been away from Mapserver for awhile and I'm having trouble wrapping 
 my head, quickly, around a template file for a simple application that 
 requires panning and zooming but no queries.
 
 Can anyone help a guy out on short notice? I can likely flesh a an 
 example out but I'm really having trouble getting started.
 
 Thanks, Gerry


-- 
Gerry Creager -- gerry.crea...@tamu.edu
Texas Mesonet -- AATLT, Texas AM University
Cell: 979.229.5301 Office: 979.458.4020 FAX: 979.862.3983
Office: 1700 Research Parkway Ste 160, TAMU, College Station, TX 77843


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


RE: [mapserver-users] purchasing satellite imagery

2011-06-09 Thread Fawcett, David (MPCA)
Where on the globe is this municipality? That may determine the availability, 
resolution, cost of the imagery.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Esmin Gracic
Sent: Thursday, June 09, 2011 12:35 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] purchasing satellite imagery

Hi all.

We're in process of developing robust eGov solution including GIS (using 
mapserver/postgis/pgrouting :) ).
This municipality has 1.059 km2.

Do you have any recommendation on where to purchase satellite imagery, and 
which scale/resolution do you recommend. Basic GIS usage is TAX calculation 
based on more than 70 parameters (mostly including distances to important 
institutions and road types etc...). This is based on vector data, but great 
imagery is also in client's interest.
Some estimated prices per km2 would be nice, too, 'cause I need to give some 
numbers to the client.

I've googled around, but would like some info from firsthand users. Quickbird 
has a resolution of 0,6 meter, but I guess that would be overkill (and 
overpriced for client)

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


[mapserver-users] Hwy Shields

2011-06-01 Thread Fawcett, David (MPCA)
Does anyone have a highway shield example map file and symbol set that they are 
willing to share?

Thanks, 

David.

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


RE: VS: [mapserver-users] Mapserver search performance

2011-05-03 Thread Fawcett, David (MPCA)
I was thinking the same thing...

You could either just import the shapefiles or use the virtual shape 
functionality.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mark Korver
Sent: Tuesday, May 03, 2011 4:06 PM
To: Varun saraf
Cc: mapserver-users@lists.osgeo.org
Subject: Re: VS: [mapserver-users] Mapserver search performance

Spatialite jumps into my mind.

http://www.gaia-gis.it/spatialite/



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


RE: [mapserver-users] Parameterized MapFile using CGI variable

2011-04-29 Thread Fawcett, David (MPCA)
One potential way to do it would be with the use of 'include's.

http://mapserver.org/mapfile/Include.html

The primary mapfile wouldn't have a connection object, but it would contain:

INCLUDE connect_info.map

Then on each machine, you would have a different version of connect_info.map 
that contained the correct connection object for that machine.

This wouldn't give you the flexibility of changing it through the CGI 
interface, but would allow you to use the same exact mapfile on both machines.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nicolas BOUTET
Sent: Friday, April 29, 2011 8:57 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Parameterized MapFile using CGI variable

Dear All,

I have 2 MapServer servers. One for Production use, and the other for 
Validation use.
The MAP files placed on those servers are similar except that each server has a 
different Oracle database as datasource.
For now, I have some different CONNECTION values depending if the map file is 
on the Production or on the Validation server. So finally I must have different 
MAP files.

Is there a way to have exactly the same map files on the 2 servers, and to use 
a variable to parameterize the CONNECTION.

For example, I would like to set the CONNECTION of my layers to 
%ORACLECONNECTIONSTRING% and to set a CGI Environment variable named 
ORACLECONNECTIONSTRING to the correct value on each server.

Nicolas

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


RE: [mapserver-users] Parameterized MapFile using CGI variable

2011-04-29 Thread Fawcett, David (MPCA)
Nicolas,

I didn't have a mapfile that utilizes connection handy, but I did test using 
INCLUDE to substitute the value for DATA in an individual layer.

Here is part of the layer definition:

LAYER
  NAME watersheds
  STATUS DEFAULT
  #DATA 'majclip'
  INCLUDE inc_data_majclip.map
  TYPE POLYGON

The file inc_data_majclip.map contains:

  DATA majclip

Based on this, I would assume that you should be able to do the same with the 
CONNECTION for each of your layers.

David.

From: Nicolas BOUTET [mailto:nicolas.bou...@geosys.com]
Sent: Friday, April 29, 2011 9:49 AM
To: Fawcett, David (MPCA); mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] Parameterized MapFile using CGI variable

Thank you David,

Yes, using INCLUDE should be a good solution. But as I know in MapServer 5.6, 
CONNECTION is a parameter of my LAYER objects, and not an object itself. So I 
cannot have a CONNECTION object declared in a separate map file... And I prefer 
to not have to duplicate the layers in different map files.

Nicolas


De : Fawcett, David (MPCA) [mailto:david.fawc...@state.mn.us]
Envoyé : vendredi 29 avril 2011 16:37
À : nicolas.bou...@geosys.com; mapserver-users@lists.osgeo.org
Objet : RE: [mapserver-users] Parameterized MapFile using CGI variable

One potential way to do it would be with the use of 'include's.

http://mapserver.org/mapfile/Include.html

The primary mapfile wouldn't have a connection object, but it would contain:

INCLUDE connect_info.map

Then on each machine, you would have a different version of connect_info.map 
that contained the correct connection object for that machine.

This wouldn't give you the flexibility of changing it through the CGI 
interface, but would allow you to use the same exact mapfile on both machines.

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Nicolas BOUTET
Sent: Friday, April 29, 2011 8:57 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Parameterized MapFile using CGI variable

Dear All,

I have 2 MapServer servers. One for Production use, and the other for 
Validation use.
The MAP files placed on those servers are similar except that each server has a 
different Oracle database as datasource.
For now, I have some different CONNECTION values depending if the map file is 
on the Production or on the Validation server. So finally I must have different 
MAP files.

Is there a way to have exactly the same map files on the 2 servers, and to use 
a variable to parameterize the CONNECTION.

For example, I would like to set the CONNECTION of my layers to 
%ORACLECONNECTIONSTRING% and to set a CGI Environment variable named 
ORACLECONNECTIONSTRING to the correct value on each server.

Nicolas

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


RE: [mapserver-users] multiple layers in a class

2011-04-27 Thread Fawcett, David (MPCA)
Mukesh,

If you want to symbolize SMALL PIG and BIG PIG differently, you will need two 
classes.  A class is used to select features that match the (optional) class 
expression.

You can have multiple styles within a class, but they would be applied equally 
to all of the features in that class.  One example might be stacking symbols 
for a feature.

The docs don’t say that you can have multiple ‘layers’ within a class, but that 
you can have multiple ‘styles’ applied within a class.  
http://mapserver.org/mapfile/style.html

In your description below, you are conceptually talking about having different 
classes within a layer, but just using different words.  Is there a reason that 
you have an aversion to using multiple classes?

You can group classes if there is a need for it.  
http://mapserver.org/mapfile/class.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mukesh Subedee
Sent: Wednesday, April 27, 2011 2:06 PM
To: mapserver mailing list
Subject: [mapserver-users] multiple layers in a class

Hi,

In the STYLE documentation, it is mentioned that it is possible to have 
multiple layers within a class. I could not find any example how it can be 
implemented. I was checking an example in 
http://lists.osgeo.org/pipermail/mapserver-users/2010-August/066303.html where 
SMALL PIG and BIG PIG are in two different classes. However I am wondering 
if it is possible to implement it within a same class but representing with 
different styles. It means representing two different PIG in a same class but 
with different coloring mechanisms.

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


RE: [mapserver-users] multiple layers in a class

2011-04-27 Thread Fawcett, David (MPCA)
No.  That is what classes are for.

What is your concern about using multiple classes?

From: Mukesh Subedee [mailto:msube...@yahoo.com]
Sent: Wednesday, April 27, 2011 3:41 PM
To: Fawcett, David (MPCA); mapserver mailing list
Subject: Re: [mapserver-users] multiple layers in a class

Oops, my bad...I meant multiple styles within a class. Does that mean I cannot 
use different color scheme for symbolizing SMALL PIG and BIG PIG within a 
same class? Is there any way to categorize each PIG with different EXPRESSION 
and give different STYLE for each within a class?

Mukesh


From: Fawcett, David (MPCA) david.fawc...@state.mn.us
To: Mukesh Subedee msube...@yahoo.com; mapserver mailing list 
mapserver-users@lists.osgeo.org
Sent: Wednesday, April 27, 2011 12:35:44
Subject: RE: [mapserver-users] multiple layers in a class
Mukesh,

If you want to symbolize SMALL PIG and BIG PIG differently, you will need two 
classes.  A class is used to select features that match the (optional) class 
expression.

You can have multiple styles within a class, but they would be applied equally 
to all of the features in that class.  One example might be stacking symbols 
for a feature.

The docs don’t say that you can have multiple ‘layers’ within a class, but that 
you can have multiple ‘styles’ applied within a class.  
http://mapserver.org/mapfile/style.html

In your description below, you are conceptually talking about having different 
classes within a layer, but just using different words.  Is there a reason that 
you have an aversion to using multiple classes?

You can group classes if there is a need for it.  
http://mapserver.org/mapfile/class.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mukesh Subedee
Sent: Wednesday, April 27, 2011 2:06 PM
To: mapserver mailing list
Subject: [mapserver-users] multiple layers in a class

Hi,

In the STYLE documentation, it is mentioned that it is possible to have 
multiple layers within a class. I could not find any example how it can be 
implemented. I was checking an example in 
http://lists.osgeo.org/pipermail/mapserver-users/2010-August/066303.html where 
SMALL PIG and BIG PIG are in two different classes. However I am wondering 
if it is possible to implement it within a same class but representing with 
different styles. It means representing two different PIG in a same class but 
with different coloring mechanisms.

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


RE: [mapserver-users] Problem with cascading WMS reprojection

2011-03-24 Thread Fawcett, David (MPCA)
Should the MAP PROJECTION block be in the MAP object?

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of William Hudspeth
Sent: Thursday, March 24, 2011 12:50 PM
To: mapserver-users@lists.osgeo.org
Cc: w...@unm.edu
Subject: [mapserver-users] Problem with cascading WMS reprojection

Hello,

I am trying to reproject a cascaded NASA MODIS NDVI raster. The original
raster is served as epsg:4326 from the NASA servers. It is using
version=1.3.0 and CRS-CRS:84. I am cascading it through my own mapserver
client/server and trying to reproject as epsg:26913 (utm zone13), where
the MAP projection and extents are in 26913.

My MAP projection looks like this:

MAP
.
EXTENT  93549 3464749 694099 4065299
UNITS METERS
.
END #END MAP OBJECT

PROJECTION
init=epsg:26913   #UTM-Zone 13N
END   #END MAP PROJECTION OBJECT


and, my LAYER definition looks like this:


LAYER
 NAME MOD13A2_E_NDVI
 TYPE RASTER
 CONNECTION http://neowms.sci.gsfc.nasa.gov/wms/wms?;
 CONNECTIONTYPE WMS
 STATUS ON

  METADATA
  wms_nameMOD13A2_E_NDVI
  wms_server_version  1.1.1 
  wms_srs EPSG:4326 
  wms_format  image/jpeg
  wms_latlonboundingbox -180 -90 180 90
  wms_transparent FALSE

  END   #METADATA

  PROJECTION
  init=epsg:4326 #WGS84 Decimal Degrees
  END  #PROJECTION

END  #LAYER

Interestingly, even though the MAP projection is NOT set to EPSG:4326, I
can make a successful request using epsg:4326. In all cases, the LAYER
metadata uses EPSG:4326.

So, while this request is successful:

http://edacwms.unm.edu/cgi-bin/mapfiles/epht_environment/epht_enviro_wms?version=1.1.1SERVICE=WMSREQUEST=GetMapFORMAT=image/jpegSTYLES=SRS=EPSG:4326BBOX=-120.000,26.000,-97.000,44.000Width=600Height=470Layers=MOD13A2_E_NDVI

This one is NOT successful:

http://edacwms.unm.edu/cgi-bin/mapfiles/epht_environment/epht_enviro_wms?version=1.1.1SERVICE=WMSREQUEST=GetMapFORMAT=image/jpegSTYLES=SRS=EPSG:26913BBOX=93549,3464749,694099,4065299Width=600Height=470Layers=MOD13A2_E_NDVI

where I get an error:  msWMSLoadGetMapParams(): WMS server error.
Invalid SRS given : SRS must be valid for all requested layers.


Any insight would be greatly appreciated...

Bill

___
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] Spherical Mercator Projection Problem

2011-02-24 Thread Fawcett, David (MPCA)
Sergey,

If your data is in epsg:4326 and you want to publish the data as epsg:3785, you 
will need to projection blocks to your layers.

Something like:

  PROJECTION
init=epsg:4326
  END
The Projection block in the MAP section defines your output projection.  
Because your data is not in the same projection, you will need to define a 
projection block in each layer section.  Those projection blocks define the 
'input' projection.  They tell MapServer what projection the data exists in.  
This allows MapServer (with proj4 support) to re-project your data to the 
output projection.

David.


From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sergey Kraev
Sent: Wednesday, February 23, 2011 5:01 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Spherical Mercator Projection Problem

Hi,

I'm running MS4W v3.0 (including MapServer 5.6.5) on Windows.

My data source are PostGIS multipolygon countries' borders.

I have successfully got MapServer to render the world map in WGS84 projection 
using these settings:

Request:

http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-180+-90+180+90

world.map:

MAP
EXTENT   -180 -90 180 90
  #EXTENT -20037508 -20037508 20037508 20037508
  SIZE   256 256
  IMAGECOLOR 153 179 204
  FONTSETc:\MS4W\fonts\fonts.list
  RESOLUTION96
  MAXSIZE5000

  PROJECTION
init=epsg:4326
#init=epsg:3785
  END
...
layers don't have PROJECTION sections

I would like MapServer to render the same data into a Web (spherical) 
Mercator projected map (epsg:3785), but I don't know how to modify my request 
and mapfile in order to get the correct map.

With the following settings I just receive a picture without any polygons.

\ms4w\proj\nad\epsg:

 ...
3785 +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 +wktext  +no_defs 
...

Request (only mapext is different):

http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-20037508+-20037508+20037508+20037508http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=world.mapmode=mapmapsize=256+256mapext=-180+-90+180+90

world.map (only EXTENT and PROJECTION are different):

MAP
  #EXTENT-180 -90 180 90
  EXTENT -20037508 -20037508 20037508 20037508
  SIZE   256 256
  IMAGECOLOR 153 179 204
  FONTSETc:\MS4W\fonts\fonts.list
  RESOLUTION96
  MAXSIZE5000

  PROJECTION
#init=epsg:4326
init=epsg:3785
  END
...
layers don't have PROJECTION sections

I'm assuming that -20037508 -20037508 20037508 20037508 is correct extent for 
the whole world map, since Google uses that and they also have Mercator 
projection.

Thanks for your help.

Sergey

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


RE: [mapserver-users] Clip Raster with a Polygon

2011-02-18 Thread Fawcett, David (MPCA)
I have done this with static mask images.  It wouldn't be hard to pass the ID 
of the feature that you want to be the 'hole' in the URL and then use that url 
variable in an expression for that layer/class .

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Rahkonen Jukka
Sent: Friday, February 18, 2011 6:02 AM
To: Gabe Codina; mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Clip Raster with a Polygon

Hi,

I have been thinking sometimes that there could be a huge polygon that is 
always drawn on top of the raster layer.  'Area of interest' polygons should be 
converted into holes in the mask polygon.  I have never tried it in practice, 
though.

-Jukka Rahkonen-


Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Gabe Codina
Lähetetty: 18. helmikuuta 2011 7:05
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: [mapserver-users] Clip Raster with a Polygon
Hi

I would like to serve a raster layer that is spatially filtered - ie the raster 
should show through where it overlaps with 1 or more polygons.

Is mapserver capable of doing this ?

Gabe Codina

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


[mapserver-users] RE: polygon tool

2011-02-17 Thread Fawcett, David (MPCA)
You might want to look at OpenLayers.  
www.openlayers.orghttp://www.openlayers.org

Here is a basic example that allows you to draw some vector features and then 
select them by drawing a box.
http://dev.openlayers.org/releases/OpenLayers-2.10/examples/select-feature.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bistrais, Bob
Sent: Thursday, February 17, 2011 8:18 AM
To: mapserver-users
Subject: [mapserver-users] polygon tool

I am trying to create a polygon tool with PHP MapScript and JavaScript.  I'd 
like to allow the user to draw a polygon which will eventually be used to 
select map features.  This kind of thing probably has been done before.  Can 
anyone direct me to some code samples?

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


  1   2   3   4   >