[mapserver-users] Refresh changes on map

2010-02-09 Thread Eduardo de la Montaña
Hi, I'm using mapserver with a layer stored on a data base with a lot of 
points, which I updated with other application. I would like that 
Mapserver draw this points depending on an atribute visible. Can 
Mapserver update the layer on the next wms request with the points 
updated? How I should set up my mapfile to do this?


Thanks in advance,
attachment: emontana.vcf___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] INSIDE Idaho

2010-02-09 Thread Jon Miner
Bringing this back onto the mailing list


Re: [mapserver-users] INSIDE Idaho...
From: greg.lu...@scu.edu.au greg.lu...@scu.edu.au...Add to Contacts 
To: Jon Miner cp_...@yahoo.com 
__

Hi Jon,

I'm very much NOT a mapserver expert (a beginner in fact), but one thing I 
noticed (it might mean nothing) is:
UNIT[Degree,0.0174532925199433]]
I
realise that ogr is saying this, but I thought UTM projection unit is
metre not degree, and I'm guessing that number (0.0174532925199433) is
how many degrees in a metre at that latitude.
Also the gdalinfo is
listing the origin and pixel size in metres. One thing you could do is
just put one layer in a mapfile and set the mapfile projection to NAD83
(or whatever the epsg code is for that) to see if you can actually see
the data at all, and then project it into what you need, using metres
(or maybe meters) as the unit, somehow. Sorry I can't help more, but
maybe this might point you in a useful direction.

Thanks,
Greg.

- Forwarded Message 
From: Jon Miner cp_...@yahoo.com
To: glu...@scu.edu.au
Sent: Mon, February 8, 2010 8:16:22 PM
Subject: Re: [mapserver-users] INSIDE Idaho


Hi Greg -

I've looked at the parameters... Here is the DRG file:


 
http://data.insideidaho.org/data2/24k/usgs/drg/idtm/quad/nocollar/archive/43112/cirbu3se_24k_usgs_drg.tgz

So I extract that file and then run gdalinfo on the tif file:

gdalinfo cirbu3se_24k_usgs_drg.tif 
Driver: GTiff/GeoTIFF
Files: cirbu3se_24k_usgs_drg.tif
Size is 4221, 5752
Coordinate System is `'
Origin = (590767.311137848766521,281203.236009103886317)
Pixel Size = (2.4384000,-2.4384000)
Metadata:
  TIFFTAG_SOFTWARE=Arc/Info
  TIFFTAG_XRESOLUTION=0.41
  TIFFTAG_YRESOLUTION=0.41
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Image Structure Metadata:
  COMPRESSION=PACKBITS
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  590767.311,  281203.236) 
Lower Left  (  590767.311,  267177.559) 
Upper Right (  601059.798,  281203.236) 
Lower Right (  601059.798,  267177.559) 
Center  (  595913.554,  274190.398) 
...etc...

Note the blank coordinate system entry... Using values from 
http://spatialreference.org, I came up with the PROJECTION values in my map 
file, which seems to work, since mapserver renders the DRG. So far so good...

Next I download some vector data:

http://data.insideidaho.org/data/USCB/TIGER2000/archive/butte/roadsl_butte_uscb.tgz

and extract it, then check it with ogrinfo:

$ ogrinfo roadsl_butte_uscb.shp roadsl_butte_uscb -so
INFO: Open of `roadsl_butte_uscb.shp'
  using driver `ESRI Shapefile' successful.

Layer name: roadsl_butte_uscb
Geometry: Line String
Feature Count: 2596
Extent: (-113.641719, 43.284631) - (-112.694959, 44.233133)
Layer SRS WKT:
GEOGCS[GCS_North_American_1983,
DATUM[North_American_Datum_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.0174532925199433]]
..etc..

If I'm not mistaken, I need to translate this to match the projection of the 
DRG file... I've been doing this with ogr2ogr:

ogr2ogr -t_srs idtm83.wkt -f ESRI Shapefile temp roadsl_butte_uscb.shp

where the idtm83.wkt contains:

PROJCS[NAD_1983_Transverse_Mercator,
GEOGCS[GCS_North_American_1983,
DATUM[D_North_American_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.0174532925199433]],
PROJECTION[Transverse_Mercator],
PARAMETER[False_Easting,250.0],
PARAMETER[False_Northing,120.0],
PARAMETER[Central_Meridian,-114.0],
PARAMETER[Scale_Factor,0.9996],
PARAMETER[Latitude_Of_Origin,42.0],
UNIT[Meter,1.0]]

ogrinfo on the new file reports:

Layer name: roadsl_butte_uscb
Geometry: Line String
Feature Count: 2596
Extent: (2528908.642544, 1342938.885743) - (2605077.684651, 1448186.034775)
Layer SRS WKT:
PROJCS[NAD_1983_Transverse_Mercator,
GEOGCS[GCS_North_American_1983,
DATUM[North_American_Datum_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.017453292519943295]],
PROJECTION[Transverse_Mercator],
PARAMETER[False_Easting,250.0],
PARAMETER[False_Northing,120.0],
PARAMETER[Central_Meridian,-114.0],
PARAMETER[Scale_Factor,0.9996],
PARAMETER[Latitude_Of_Origin,42.0],
UNIT[Meter,1.0]]

To me (as a programmer, not a map guru) everything seems to match up... Can you 
spot something that is not right?

Thanks

- Jon





From: greg.lu...@scu.edu.au greg.lu...@scu.edu.au
To: Jon Miner cp_...@yahoo.com
Sent: Mon, February 8, 2010 5:50:47 PM
Subject: Re: [mapserver-users] INSIDE Idaho

Hi John,

According to this page: http://inside.uidaho.edu/tutorial/data/data.htm all 
INSIDE data:
are available in Idaho Transverse Mercator (IDTM) projection.  Additionally, 
some data are available in Universal Transverse 
Mercator (UTM) projection. (UTM zone 11 or zone 12). Parameters 

[mapserver-users] Re: [MS4W-Users] Adding a SLD for a WMS Service

2010-02-09 Thread David Martinez Morata
Thanks.

I try to appli a SLD with diferent calses but , I have and SLD error:

Tue Feb 09 09:01:55 2010].152000 : WMS server error. Invalid SLD document :
?xml version=1.0 encoding=utf-8?StyledLayerDescriptor xmlns:xlink=
http://www.w3.org/1999/xlink; xmlns:ogc=http://www.opengis.net/ogc; xmlns=
http://www.opengis.net/sld;
xsi:schemaLocation=http://www.opengis.net/sldStyledLayerDescriptor.xsd;
xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance; version=1.0.0
NamedLayerNameHIDROGRAFIA_GEO_REGVEN_25MIL.shp/NameUserStyleFeatureTypeStyleRuleName

I need to define my classes in the CLASS tag of the layer in the mapfile?



2010/2/8 Jeff McKenna jmcke...@gatewaygeomatics.com

 David Martinez Morata wrote:
  Hello.
 
  I have a map file to Serve some layers, and I need to link some layers
  with a sld files.
  I read the SLD documentation in the MApserver web site, but i don't
  reali understud what I'm doing:
 
  1 I put in my layer defifnition
 
  SLD Path/to/my/sld/file.sld
 
  I try with metadatas
 
  wms_sld_url Path/to/my/sld/file.sld
   wms_sld_body AUTO
  *ows_sld_enabled*  true
 
  But didn't works
 
  I modifie my sld (gvsig generated) file deleting the tags that are not
  compatible with mapserver and I don't know what to do with...
 
  Any Help?

 I don't have any other advice other than to follow the advice in the SLD
 document (http://www.mapserver.org/ogc/sld.html#client-side-support).
 It sounds like you have a local SLD file, so you should read the
 instructions there for using the wms_sld_body metadata parameter in
 your WMS Client layer (I believe the contents of that metadata is not a
 path, but all of the text in the sld document...in any case it is
 described more in the SLD document for your reference).

 -jeff


 --
 Jeff McKenna
 MapServer Consulting and Training Services
 http://www.gatewaygeomatics.com/


 ___
 MS4W-Users mailing list
 ms4w-us...@lists.maptools.org
 http://lists.maptools.org/mailman/listinfo/ms4w-users




-- 
Martinez Morata David
Thinking GIS
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Daniel Morissette

Lime, Steve D (DNR) wrote:


This will print the entire error stack one per line. PHP-MapScript must 
have something similar. We need to know if the problem is parsing the 
query file or if it’s running the query itself.




There is an example showing how to dump the error stack in PHP MapScript 
at http://mapserver.org/mapscript/php/index.html#errorobj-class


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


Re: [mapserver-users] INSIDE Idaho

2010-02-09 Thread Jon Miner
Small progress this morning;

The extent numbers on my vector data seemed way off, so I switched to IDTM27, 
which uses easting=50 and northing=10, and the results were much 
closer.  There is a visible difference on the mapserver output... all the 
vector data is rendered just a bit west of the matching DRG data. Close 
enough for now.

Contents of my modified idtm83.wtk:

PROJCS[NAD_1983_Transverse_Mercator,
GEOGCS[GCS_North_American_1983,
DATUM[D_North_American_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.0174532925199433]],
PROJECTION[Transverse_Mercator],
PARAMETER[False_Easting,50.0],
PARAMETER[False_Northing,10.0],
PARAMETER[Central_Meridian,-114.0],
PARAMETER[Scale_Factor,0.9996],
PARAMETER[Latitude_Of_Origin,42.0],
UNIT[Meter,1.0]]




- Original Message 
From: Jon Miner cp_...@yahoo.com
To: mapserver-users@lists.osgeo.org
Sent: Tue, February 9, 2010 6:47:51 AM
Subject: Re: [mapserver-users] INSIDE Idaho

Bringing this back onto the mailing list


Re: [mapserver-users] INSIDE Idaho...
From: greg.lu...@scu.edu.au greg.lu...@scu.edu.au...Add to Contacts 
To: Jon Miner cp_...@yahoo.com 
__

Hi Jon,

I'm very much NOT a mapserver expert (a beginner in fact), but one thing I 
noticed (it might mean nothing) is:
UNIT[Degree,0.0174532925199433]]
I
realise that ogr is saying this, but I thought UTM projection unit is
metre not degree, and I'm guessing that number (0.0174532925199433) is
how many degrees in a metre at that latitude.
Also the gdalinfo is
listing the origin and pixel size in metres. One thing you could do is
just put one layer in a mapfile and set the mapfile projection to NAD83
(or whatever the epsg code is for that) to see if you can actually see
the data at all, and then project it into what you need, using metres
(or maybe meters) as the unit, somehow. Sorry I can't help more, but
maybe this might point you in a useful direction.

Thanks,
Greg.

- Forwarded Message 
From: Jon Miner cp_...@yahoo.com
To: glu...@scu.edu.au
Sent: Mon, February 8, 2010 8:16:22 PM
Subject: Re: [mapserver-users] INSIDE Idaho


Hi Greg -

I've looked at the parameters... Here is the DRG file:


http://data.insideidaho.org/data2/24k/usgs/drg/idtm/quad/nocollar/archive/43112/cirbu3se_24k_usgs_drg.tgz

So I extract that file and then run gdalinfo on the tif file:

gdalinfo cirbu3se_24k_usgs_drg.tif 
Driver: GTiff/GeoTIFF
Files: cirbu3se_24k_usgs_drg.tif
Size is 4221, 5752
Coordinate System is `'
Origin = (590767.311137848766521,281203.236009103886317)
Pixel Size = (2.4384000,-2.4384000)
Metadata:
  TIFFTAG_SOFTWARE=Arc/Info
  TIFFTAG_XRESOLUTION=0.41
  TIFFTAG_YRESOLUTION=0.41
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Image Structure Metadata:
  COMPRESSION=PACKBITS
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  590767.311,  281203.236) 
Lower Left  (  590767.311,  267177.559) 
Upper Right (  601059.798,  281203.236) 
Lower Right (  601059.798,  267177.559) 
Center  (  595913.554,  274190.398) 
...etc...

Note the blank coordinate system entry... Using values from 
http://spatialreference.org, I came up with the PROJECTION values in my map 
file, which seems to work, since mapserver renders the DRG. So far so good...

Next I download some vector data:

http://data.insideidaho.org/data/USCB/TIGER2000/archive/butte/roadsl_butte_uscb.tgz

and extract it, then check it with ogrinfo:

$ ogrinfo roadsl_butte_uscb.shp roadsl_butte_uscb -so
INFO: Open of `roadsl_butte_uscb.shp'
  using driver `ESRI Shapefile' successful.

Layer name: roadsl_butte_uscb
Geometry: Line String
Feature Count: 2596
Extent: (-113.641719, 43.284631) - (-112.694959, 44.233133)
Layer SRS WKT:
GEOGCS[GCS_North_American_1983,
DATUM[North_American_Datum_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.0174532925199433]]
..etc..

If I'm not mistaken, I need to translate this to match the projection of the 
DRG file... I've been doing this with ogr2ogr:

ogr2ogr -t_srs idtm83.wkt -f ESRI Shapefile temp roadsl_butte_uscb.shp

where the idtm83.wkt contains:

PROJCS[NAD_1983_Transverse_Mercator,
GEOGCS[GCS_North_American_1983,
DATUM[D_North_American_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.0174532925199433]],
PROJECTION[Transverse_Mercator],
PARAMETER[False_Easting,250.0],
PARAMETER[False_Northing,120.0],
PARAMETER[Central_Meridian,-114.0],
PARAMETER[Scale_Factor,0.9996],
PARAMETER[Latitude_Of_Origin,42.0],
UNIT[Meter,1.0]]

ogrinfo on the new file reports:

Layer name: roadsl_butte_uscb
Geometry: Line String
Feature Count: 2596
Extent: (2528908.642544, 1342938.885743) - (2605077.684651, 1448186.034775)
Layer SRS WKT:
PROJCS[NAD_1983_Transverse_Mercator,

Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Moen, Paul T.
This is the error I get when dumping the error stack as described below.

Error in msEvalRegex(): String failed expression test.


On Feb 9, 2010, at 7:51 AM, Daniel Morissette wrote:

Lime, Steve D (DNR) wrote:
 
 This will print the entire error stack one per line. PHP-MapScript must 
 have something similar. We need to know if the problem is parsing the 
 query file or if it’s running the query itself.
 

There is an example showing how to dump the error stack in PHP MapScript 
at http://mapserver.org/mapscript/php/index.html#errorobj-class

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

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


[mapserver-users] WMS BBOX tolerance out of this world?

2010-02-09 Thread Charlton Galvarino
Hi, all.  I'm hoping that someone knows this answer off the top of their head 
so I won't have to sort through mountains of OGC specs.  That's the lazy 
developer in me.

Let's say we're dealing w/ epsg 4326.  We as humans (some mostly human) know 
that this generally means -180,-90,180,90.  Or perhaps sometimes 0,-90,360,90.

My question is, does the WMS server need to support queries outside of these 
bounds?  E.g. for a dataset advertised as 4326 w/ bounds -180,-90,180,90, if 
the user requests -198,-99,198,99, should the user get the 'data' image 
surrounded by white space or get an error that says 'sorry, that was something 
I don't understand'?  A GetCaps can advertise the BBOX for the site and each 
layer, but I'm still asking about these exceptional cases.

I dug around and found that both ESRI and MapServer WMS servers support these 
queries just fine.  But are they being nice, or does the WMS spec say that 
these are valid queries and that the servers should support them?

Many TIA,

Charlton

Examples of ESRI  MapServer queries.  Apologies if the URL's get chopped up in 
listserv land.

ESRI world
http://toposervices.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDNA_geo?LAYERS=CountiesFORMAT=image%2FpngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-180,-90,108,90WIDTH=360HEIGHT=180

ESRI world + 10% in all directions
http://toposervices.cr.usgs.gov/wmsconnector/com.esri.wms.Esrimap/USGS_EDNA_geo?LAYERS=CountiesFORMAT=image%2FpngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-198,-99,198,99WIDTH=360HEIGHT=180

MapServer world
http://disc1.sci.gsfc.nasa.gov/daac-bin/wms_airs?LAYERS=AIRX3STD_SURFPRES_DFORMAT=image%2FpngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-180,-90,108,90WIDTH=360HEIGHT=180

MapServer world + 10% in all directions
http://disc1.sci.gsfc.nasa.gov/daac-bin/wms_airs?LAYERS=AIRX3STD_SURFPRES_DFORMAT=image%2FpngTRANSPARENT=trueVERSION=1.1.1SERVICE=WMSREQUEST=GetMapSTYLES=EXCEPTIONS=application%2Fvnd.ogc.se_inimageSRS=EPSG%3A4326BBOX=-198,-99,198,99WIDTH=360HEIGHT=180





Charlton Galvarino
1 (803) 233-6205 : voice
1 (803) 223-9579 :   fax
charl...@2creek.com

P.O. Box 50960
Columbia, SC 29250

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


Re: [mapserver-users] many raster projections

2010-02-09 Thread Andy Colson

On 2/8/2010 1:31 PM, Fawcett, David (MPCA) wrote:

Andy,

Assuming that MapServer can find the data, the main reason that you
wouldn't see any data for the layer is that it doesn't fall within
the output extent bbox.  (To rule out any data issues, you could
create a second map file with no projection info and only your 07
layer.  Run gdalinfo against the 07 data and use the bbox info to set
your map file extent)

What do you see if you run the gdalinfo utility against the data (or
one of your tiles) from raster07?
the gdalinfo is impressively long, here is the parts that I think are 
important:


Size is 48980, 49445
Coordinate System is:
PROJCS[NAD83 / UTM zone 15N,
GEOGCS[NAD83,
DATUM[North_American_Datum_1983,
SPHEROID[GRS 1980,6378137,298.2572221010002,
AUTHORITY[EPSG,7019]],
AUTHORITY[EPSG,6269]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4269]],
PROJECTION[Transverse_Mercator],
PARAMETER[latitude_of_origin,0],
PARAMETER[central_meridian,-93],
PARAMETER[scale_factor,0.9996],
PARAMETER[false_easting,50],
PARAMETER[false_northing,0],
UNIT[metre,1,
AUTHORITY[EPSG,9001]],
AUTHORITY[EPSG,26915]]
Origin = (429904.000,4428374.000)

Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  429904.000, 4428374.000) ( 93d49'16.36W, 40d 0'9.53N)
Lower Left  (  429904.000, 4378929.000) ( 93d48'57.36W, 39d33'25.87N)
Upper Right (  478884.000, 4428374.000) ( 93d14'50.62W, 40d 0'19.05N)
Lower Right (  478884.000, 4378929.000) ( 93d14'44.90W, 39d33'35.25N)
Center  (  454394.000, 4403651.500) ( 93d31'57.31W, 39d46'53.71N)


my mapfile has: MAP EXTENT 1285920 1377857 1426390 1506589

so, yeah, the origin is not within the bbox.  On an image that works, it 
has:


Origin = (1329809.95399910593,1463071.94800091270)

which looks to be within the bbox.  So how do I get the arial moved? 
Why didnt putting the projection in the raster layer (or running 
gdal_translate or gdal_warp) move it into the right bbox?




Does the spatial reference system
match what you thought that it was?


Huh?  Does spatial reference system == projection == Coordinate 
System?  I dont know...





It looks like the definition for your output projection does match
epsg:2816.  http://spatialreference.org/ref/epsg/2816/

If you look at the extent that you are setting in your map file (in
coordinates of epsg:2816), you aren't covering the southern part of
the zone.  Did you base your extent on the entire area that you need
to cover?
I got the bounds from a shapefile, its the largest one and covers 
everything I want to display.  See the ogrinfo below.





Also, you have UNITS set to feet, but your output projection has
'+units=m'. I would set units to METERS.



Well crap.


 ogrinfo -so countyBoundary.shp countyBoundary
INFO: Open of `countyBoundary.shp'
  using driver `ESRI Shapefile' successful.

Layer name: countyBoundary
Geometry: Polygon
Feature Count: 1
Extent: (1285920.182293, 1377857.531376) - (1426390.260458, 1506589.406771)
Layer SRS WKT:
PROJCS[NAD_1983_StatePlane_Missouri_Central_FIPS_2402_Feet,
GEOGCS[GCS_North_American_1983,
DATUM[North_American_Datum_1983,
SPHEROID[GRS_1980,6378137.0,298.257222101]],
PRIMEM[Greenwich,0.0],
UNIT[Degree,0.0174532925199433]],
PROJECTION[Transverse_Mercator],
PARAMETER[False_Easting,1640416.7],
PARAMETER[False_Northing,0.0],
PARAMETER[Central_Meridian,-92.5],
PARAMETER[Scale_Factor,0.],
PARAMETER[Latitude_Of_Origin,35.84],
UNIT[Foot_US,0.3048006096012192]]
NAME: String (50.0)
SHAPE_Leng: Real (19.11)
SHAPE_Area: Real (19.11)


That means its in feet, right?  Both my mapfile and OpenLayers are using:
+proj=tmerc +lat_0=35.84 +lon_0=-92.5 +k=0.3 
+x_0=50 +y_0=0 +ellps=GRS80 +units=m +no_defs


Does that mean mapserver is reprojecting to meters... thats probably why 
OpenLayers can show it, right?  The output of mapserver is meters and 
OpenLayers is expecting meters.  So that's not really bad, right?  But 
if I reproject the shapefiles it'll save me some cpu time, yes?


Would this affect the arials?


Thank you very much with the help on this.

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


RE: [mapserver-users] Refresh changes on map

2010-02-09 Thread Fawcett, David (MPCA)
Eduardo, 

Yes, this is possible.  

Every request to MapServer is made against the latest version of your data.  To 
draw only points with a value of 'yes' in the column named 'visible':

- add a layer to your map file that connects to your data source.

- add a class to the layer

- add a style to your layer that defines how the points will be symbolized

- Now, test the map file at this point to see if your data works correctly.  
You can do this by using the shp2img utility that comes with MapServer or even 
easier, make a URL request to MapServer using mode=map.

- once the layer works, add an filter to your layer.  The syntax may vary based 
on the database that you are using, but it should be something like FILTER 
visible = 'yes'.  


I think that the simplest strategy for you is to:

- get the layer working as a simple CGI MapServer call.
- then apply your expression to limit the points to only the ones that you want
- finally, modify your map file to server the layer as a WMS

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Eduardo de la 
Montaña
Sent: Tuesday, February 09, 2010 4:00 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Refresh changes on map

Hi, I'm using mapserver with a layer stored on a data base with a lot of 
points, which I updated with other application. I would like that Mapserver 
draw this points depending on an atribute visible. Can Mapserver update the 
layer on the next wms request with the points updated? How I should set up my 
mapfile to do this?

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


[mapserver-users] RE: WMS BBOX tolerance out of this world?

2010-02-09 Thread Charlton Galvarino
 My question is, does the WMS server need to support queries outside of
 these bounds?  E.g. for a dataset advertised as 4326 w/ bounds -180,-

According to the 1.1.1 spec . . .


If a request contains a Bounding Box whose area does not overlap at all with 
the BoundingBox advertised in the Capabilities XML for the requested geodata 
object, the server should return empty content (e.g., a blank map, empty 
coverage file, null feature set) for that element. Any elements that are partly 
or entirely contained in the Bounding Box should be returned in the appropriate 
format.

If the Bounding Box values are not defined for the given SRS (e.g., latitudes 
greater than 90 degrees in EPSG:4326), the server should return empty content 
for areas outside the valid range of the SRS.



Well, it sounds pretty clear then.  Return the data for the area that is 
defined.  Right?
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WMS BBOX tolerance out of this world?

2010-02-09 Thread Daniel Morissette

Charlton Galvarino wrote:


My question is, does the WMS server need to support queries outside of these 
bounds?  E.g. for a dataset advertised as 4326 w/ bounds -180,-90,180,90, if 
the user requests -198,-99,198,99, should the user get the 'data' image 
surrounded by white space or get an error that says 'sorry, that was something 
I don't understand'?  A GetCaps can advertise the BBOX for the site and each 
layer, but I'm still asking about these exceptional cases.

I dug around and found that both ESRI and MapServer WMS servers support these 
queries just fine.  But are they being nice, or does the WMS spec say that 
these are valid queries and that the servers should support them?



My interpretation of the spec is that it is okay to return white space 
and those cases. Here is what WMS 1.1.1 section 6.5.6 says about this:



If a request contains a Bounding Box whose area does not overlap at all 
with the BoundingBox advertised in the Capabilities XML for the 
requested geodata object, the server should return empty content (e.g., 
a blank map, empty coverage file, null feature set) for that element. 
Any elements that are partly or entirely contained in the Bounding Box 
should be returned in the appropriate format.



Later in the text, they open the door to an (optional) exception to the 
above rule for maps crossing the date line (+/- 180 degrees longitude), 
in which case a server could choose to support requests such as 
lon=120,250 to cover the Pacific Ocean for instance.


However I don't think this changes the answer to your question, i.e. it 
is okay for a client to request maps whose bbox does not fit strictly 
inside the advertized layer bounds, and in this case the client should 
expect some white space around the data.


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


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Daniel Morissette

Moen, Paul T. wrote:

This is the error I get when dumping the error stack as described below.

Error in msEvalRegex(): String failed expression test.



My first guess is that this error message comes from the file extension 
test on the filename of your query file. Your query file has to have a 
.qy extension if I'm not mistaken, otherwise MapServer won't open it.


This error message should definitely be improved.

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


[mapserver-users] Pixmap problem

2010-02-09 Thread Eduardo de la Montaña
Hi, I'm using pixmap (a PNG image)  for my layer of points on Mapserver. 
It works perfectly, but when the point is near of the edge of the tile, 
the symbol appeared cutted, only part of the symbol is visible. How can 
I solve this problem? Any suggestion is welcome,


Thanks in advance
attachment: emontana.vcf___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Pixmap problem

2010-02-09 Thread Lime, Steve D (DNR)
For point symbols I don't believe you can stop the cropping of the marker. To 
do so you'd need to probably switch to an annotation layer in which the markers 
are considered part of a label. Then you can set PARTIALS FALSE in the label 
object. The downside here is that the label processing will remove overlapping 
markers which may not be what you want. You can try setting LABELCACHE OFF 
(layer object) or even FORCE TRUE (label object) to get around that. Here's a 
sample layer definition (not tested):

LAYER
  NAME 'markers'
  DATA 'some point shapefile'
  STATUS DEFAULT
  TYPE ANNOTATION
  CLASS
STYLE
  SYMBOL 'marker.png'
END
LABEL
  PARIALS FALSE
  FORCE TRUE
END
TEXT ' ' # I think you have to draw some text for this to work
  END
END

Something to try anyway...

Steve

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Eduardo de la 
Montaña
Sent: Tuesday, February 09, 2010 10:30 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Pixmap problem

Hi, I'm using pixmap (a PNG image)  for my layer of points on Mapserver. 
It works perfectly, but when the point is near of the edge of the tile, the 
symbol appeared cutted, only part of the symbol is visible. How can I solve 
this problem? Any suggestion is welcome,

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


Re: [mapserver-users] php mapscript loadQuery problem

2010-02-09 Thread Moen, Paul T.

 Daniel Morissette wrote:
 Moen, Paul T. wrote:
 This is the error I get when dumping the error stack as described below.
 
 Error in msEvalRegex(): String failed expression test.
 
 
 My first guess is that this error message comes from the file extension 
 test on the filename of your query file. Your query file has to have a 
 .qy extension if I'm not mistaken, otherwise MapServer won't open it.
 
Oops, I did not know that.  I changed the extension to .qy and the loadQuery 
gives a MS_SUCCESS.  

The right items are high lighted now but I get many of the following errors 
when I dumping the error stack.

 Error in msEvalExpression(): Cannot evaluate expression, no item index defined.

This only seems to happen when there are many classes in the layer.  Are these 
errors expected?

Thanks, 

Paul
 

 This error message should definitely be improved.
 
 For the record, I have created a ticket to make sure we don't forget to 
 fix this error message:
 
 http://trac.osgeo.org/mapserver/ticket/3302
 
 Daniel
 -- 
 Daniel Morissette
 http://www.mapgears.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-dev] RE: [mapserver-users] colorramp and datarangeon the fly?

2010-02-09 Thread Lime, Steve D (DNR)
I don't want to see this die. Perhaps we could take thread and either rework 
RFC 6 (http://mapserver.org/development/rfc/ms-rfc-6.html) which has to do with 
color ramping or create a new one to supplant it. Any takers?

Steve

-Original Message-
From: Stephen Woodbridge [mailto:wood...@swoodbridge.com] 
Sent: Thursday, February 04, 2010 12:39 PM
To: Lime, Steve D (DNR)
Cc: Bob Basques; Jan Hartmann; MapServer Dev Mailing List; 
mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-dev] RE: [mapserver-users] colorramp and datarangeon 
the fly?

To build on what Steve is saying it might help to think of features in 
mapserver as requiring two separate components:

1) the algorithm
2) the presentation

Obviously you can not present something that you do not have. the 
algorithm is how you generate stuff. Once we have stuff we need to 
present it via the multitude of rendering modules and interfaces, like 
the CGI interface or template interface, etc and rendered as text, json, 
xml, etc.

I think adding a STATS object might be a good way to add pluggable 
algorithms and filters into the layer.

A year plus ago, I did some research into thematic cartography and the 
math and statistics involved in that.

Here are some of the data classification methods we might want to support:

1) equal intervals
2) quantiles (quartiles are n=4 quantiles)
3) mean-standard deviation
4) maximum breaks
5) natural breaks
6) optimal

You can probably find more on these on wikipedia if you want the math 
behind them.

In addition to the above for choropleths we might want to consider 
bivariant or multivariant analysis.

And there is also a need to apply filters to the data like:

1) eliminate outliers
2) numerous smoothing algorithms that might be appropriate
   - triangularization
   - inverse distance
   - kriging
   - various interpolation routines that solve various issues with the data
3) probably others

You might look on Amazon used books for some reference material on 
thematic mapping. I got the following:

Introduction to Thematic Cartography, by Judith Tyner
Thematic Cartography and Visualization, by Terry Slocum
Thematic Cartography and Geographic Visualization, by Slocum, McMaster, 
Kessler and Howard

These are all excellent and there are a lot of others.

I think the point here is that there is a lot of research that has gone 
into this field and if we want to build tools that will allow mapserver 
to work effectively in this area, and I DO think we should do this, then 
we need to understand the scope of what needs to be done even if it is 
not all done at once and we need to build a pluggable interface that 
allows us to easily add stats analysis and apply statistical filters as 
the need arises. I think for the most part what Steve L has described 
will meet (I guessing) 80-90% of the requirements that might reasonably 
thrown at us and the others we can most likely say are too specialized 
or out of scope.

I will also note that for the most part it can be argued that mapserver 
should NOT do the analysis, that that is the realm of other tools, but 
given that the analysis has been preformed that mapserver needs to 
support rendering it. Some of the analysis mentioned above it 
non-trivial to do on the fly. It is not clear to me where we draw a line 
in the sand and justify yes this in mapserver, no, that is not in mapserver.

Ok, sorry this probably way more than any of you want to know :)

-Steve W

Lime, Steve D (DNR) wrote:
 You're always mixing things up aren't you...
 
 I don't think you need a  special mode. This strikes me as just another 
 special form of template output based on a query.  Presently you can get 
 layer level  query data (e.g. number of results) and of course spatial 
 and non-spatial attributes for each feature. What's needed here is the 
 mechanism to gather layer stats (and a definition of what those are) in 
 either draw or query context and then a means of using or presenting 
 them.  Imaging in a new stats tag within a result set like so (within 
 a resultset tag):
 
 [stats item=foo format=$stddev,$min,$max]
 
 You could use that to populate XML, JSON or just plain HTML output for 
 use on the client. This tag would draw from a populated layerStatsObj 
 which might consist of an array or hash of itemStatsObj's...  You could 
 populate those objects on-the-fly or perhaps even from a file. Would 
 probably need a new STATS ... END block within a layer to drive this. Just 
 thinking out loud.
 
 Steve
 
 *From:* Bob Basques [mailto:bob.basq...@ci.stpaul.mn.us]
 *Sent:* Thursday, February 04, 2010 8:19 AM
 *To:* Lime, Steve D (DNR); Stephen Woodbridge; Jan Hartmann
 *Cc:* MapServer Dev Mailing List; mapserver-users@lists.osgeo.org
 *Subject:* RE: [mapserver-dev] RE: [mapserver-users] colorramp and 
 datarangeon the fly?
 
  
 
 All,
 
  
 
 Just to mix it up a little, what about doing a half and half approach. 
  MapServer could generate something simpler (the data 

RE: [mapserver-users] Continuing problem with WCS and ENVI Multi-band files

2010-02-09 Thread Lime, Steve D (DNR)
Any chance of getting a test dataset?

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Peter Willis
Sent: Monday, February 08, 2010 12:37 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Continuing problem with WCS and ENVI Multi-band files

Hello,

I continue to have a problem selecting
a single band from a multi-band (563 bands)
ENVI format BSQ file.

Using the following URL mapserver gives me a FLOAT32 GTiff
file but it is always filled with zeros.

http://wcs.foo.com/cgi-bin/wcs?REQUEST=GetCoverageSERVICE=WCSVERSION=1.0.0COVERAGE=NDVICRS=EPSG:4326BBOX=-135,55,-121,46WIDTH=256HEIGHT=256FORMAT=GEOTIFF_FLOATBand=122

Is there any documentation that clearly
shows how WCS can be set up to do this?

My current LAYER definition is as follows:

LAYER
   NAME VegetationIndex
   STATUS OFF
   DEBUG ON
   TYPE RASTER
   METADATA
 wcs_label   Data/NDVI
 wcs_rangeset_name   'bands'
 wcs_rangeset_label  NDVI
 ows_extent '-135 55 -121 46'
 wcs_resolution '0.08332 -0.083332'
 ows_srs 'EPSG:4326'
 wcs_srs 'EPSG:4326'
 wcs_formats 'GEOTIFF_FLOAT,GEOTIFF_INT16'
 wcs_nativeformat 'ENVI'

   END
   DATA /NDVI/ndvi.img
   PROJECTION
 init=epsg:4623
   END
   DUMP TRUE
END

___
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] Continuing problem with WCS and ENVI Multi-band files

2010-02-09 Thread Peter Willis

Hello,

This has actually been resolved. I just haven't got back here to
give an update until now.

The proper mapserver use case for ENVI type rasters and WCS
will be posted at mapserver.org by Frank Warmerdam once I
get my 'stuff' together.

There are some small sample ENVI test files available at:

http://filebin.ca/cpaux/ENVI_test_files.ZIP

NOTE: the files listed as ...int32...
are actually  ...int16... and the file name
is a typo.

These files (content) are not scientific data files
but 6 band binary files with headers.
The image data is a text burn in of the
band number in each band on a zero background.

The problem I was having with my WCS dataset
LAYER definition seemed to clear up with some
minor editing.

There is a sample map file for UMN mapserver
and ENVI format WCS located at:

http://filebin.ca/upkmxs/mapfile.txt

The geographic pixel size in the map file is incorrect.
It should be 2.8125 degrees not 0.08333. The file is only 128x64 spatially.

the band selection for GetCoverage URL is bands=number

ie:(see end of URL line)

http://somewcsserver.net/cgi-bin/wcs?REQUEST=GetCoverageSERVICE=WCSVERSION=1.0.0COVERAGE=BOGUStestDataCRS=EPSG:4326BBOX=-180,-90,180,90WIDTH=128HEIGHT=64FORMAT=GEOTIFF_FLOATbands=6

Hope that's useful.

If you need NDVI that's a whole other story. :)

Peter


Lime, Steve D (DNR) wrote:

Any chance of getting a test dataset?

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Peter Willis
Sent: Monday, February 08, 2010 12:37 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Continuing problem with WCS and ENVI Multi-band files

Hello,

I continue to have a problem selecting
a single band from a multi-band (563 bands)
ENVI format BSQ file.

Using the following URL mapserver gives me a FLOAT32 GTiff
file but it is always filled with zeros.

http://wcs.foo.com/cgi-bin/wcs?REQUEST=GetCoverageSERVICE=WCSVERSION=1.0.0COVERAGE=NDVICRS=EPSG:4326BBOX=-135,55,-121,46WIDTH=256HEIGHT=256FORMAT=GEOTIFF_FLOATBand=122

Is there any documentation that clearly
shows how WCS can be set up to do this?

My current LAYER definition is as follows:

LAYER
   NAME VegetationIndex
   STATUS OFF
   DEBUG ON
   TYPE RASTER
   METADATA
 wcs_label   Data/NDVI
 wcs_rangeset_name   'bands'
 wcs_rangeset_label  NDVI
 ows_extent '-135 55 -121 46'
 wcs_resolution '0.08332 -0.083332'
 ows_srs 'EPSG:4326'
 wcs_srs 'EPSG:4326'
 wcs_formats 'GEOTIFF_FLOAT,GEOTIFF_INT16'
 wcs_nativeformat 'ENVI'

   END
   DATA /NDVI/ndvi.img
   PROJECTION
 init=epsg:4623
   END
   DUMP TRUE
END

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