Re: [mapserver-users] WFS on a view from a spatialite source

2013-04-12 Thread pcreso
Hi Andrea,

I'm not a spatialite user (more Postgis), but you may need to create an entry 
in the geometry_columns table that describes the view for mapserver to be able 
to access it.


Brent Wood


--- On Sat, 4/13/13, aperi2007  wrote:

From: aperi2007 
Subject: [mapserver-users] WFS on a view from a spatialite source
To: mapserver-users@lists.osgeo.org
Date: Saturday, April 13, 2013, 11:17 AM

Hi,

I'm try-ing to start a wfs service using a spatialite db as datasosurce.
It work if I use a table.

But using a spatial view it don't seem work
It return a GML Bound NULL.

I don't know if I'm wrong to set it.

There is any on that as successfully use a spatial view of spatialite as 
datasource for wfs ?

Thx,

Andrea Peri

___
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] Connection to SpatiaLite utilizing SQL

2013-02-22 Thread pcreso
Try renaming your "Lines" table to "lines" - remove the upper case "L"

I'm not a spatiallite user, but this might help...


Brent Wood

--- On Sat, 2/23/13, Rahkonen Jukka  wrote:

From: Rahkonen Jukka 
Subject: Re: [mapserver-users] Connection to SpatiaLite utilizing SQL
To: "Roman" , "mapserver-users@lists.osgeo.org" 

Date: Saturday, February 23, 2013, 12:02 PM

Hi,

I checked my mapfiles and I have been using
CONNECTIONTYPE OGR
CONNECTION "\ms4w\data\OSM_Suomi_20120213.sqlite"
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA "select geometry, osm_id ,place , name from osm_point where place is not 
null"

Nothing so much different than what you have. The error you get looks a bit odd 
and suggests that Mapserver is trying to find a table called "Lines(geometry)".

I would make a blind try and copy the "Lines" table to another table with all 
underscore characters in the table name.

-Jukka Rahkonen-


Roman wrote:

Hi list,
I have a working connection to SpatiaLite

  CONNECTION "c:/Temp/test.sqlite"
  DATA "Lines"

For certain layers I need to specify connection by SQL. According to 
http://mapserver.org/input/vector/sqlite.html I tried this:

  CONNECTION "c:/Temp/test.sqlite"
  DATA "SELECT geometry FROM Lines"

With 6.2.0 stable it does not render specified layer and does not throw any 
error.
With development version taken from http://www.gisinternals.com/sdk/ I get an 
error "msOGRFileNextShape(): OGR error. Unable to query table Lines(geometry) 
for column definitions : no such table: Lines(geometry)."

Geometry column is correctly registered in geometry_columns table and "ogrinfo 
test.sqlite Lines -summary" says "Geometry Column = geometry". Where could be 
the problem?

Thank you in advance.

Roman

___
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] WCS timeseries data via mapserver

2012-10-28 Thread pcreso
Does anyone have an example of using mapserver to deliver 1D timeseries data as 
a WCS service?

Is mapserver able to do this?

Is there a generic client that can display such WCS content?

Thanks,

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


Re: [mapserver-users] mapserver as a wms server for arcgis client

2012-09-13 Thread pcreso
Can you confirm it works OK with other clients, like QGIS?

I generally use QGIS for testing, as I can easily & simultaneously open the 
shapefiles, imagery, postgis tables, etc as well as the WMS/WFS outputs to 
ensure all is doing exactly what it should.

We are using mapserver to provide layers to clients using ESRI so it does work.

I would also note that mapserver 5.2 is a bit dated now, & wms v1.3.0 is the 
current version which you do not show support for.

Brent Wood

--- On Thu, 9/13/12, Jessica Clarke  wrote:

From: Jessica Clarke 
Subject: [mapserver-users] mapserver as a wms server for arcgis client
To: mapserver-users@lists.osgeo.org
Date: Thursday, September 13, 2012, 6:53 PM


 
 

Hi, 
I'm hoping someone can help me identify why my wms layers in arcgis are coming 
up blank. 

Here is my mapfile:
MAP
 NAME "WMSQuick"
 STATUS ON
 EXTENT 227154 5165779 627108 5614539
 UNITS DD
 SHAPEPATH "c:/images"
 SIZE 800 600
 PROJECTION
  "init=epsg:28355"
 END
 OUTPUTFORMAT
  NAME 'AGG/PNG'
  DRIVER AGG/PNG
 END
 WEB
  IMAGEPATH "C:/images/"
  IMAGEURL "/images/"
  METADATA
    "wms_title" "WMS Demo"  ##required
    "wms_onlineresource" 
"http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&";
    "wms_enable_request" "*"   ##necessary
    "wms_server_version" "1.1.1"
    "wms_extent" "227154 5165779 627108 5614539"
  END
 END
 LAYER
  NAME "AdminCountries"
  STATUS ON
  TYPE POLYGON
  DATA "img_index.shp"
  CLASS
   STYLE
COLOR 246 241 223
OUTLINECOLOR 0 0 0
   END
  END
  METADATA
   "wms_title" "admin_countries"
   "wms_name" "admincountries"
   "wms_server_version" "1.1.1"
   #"wms_extent" "227154 5165779 627108 5614539" 
   "wms_onlineresource" 
"http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&";
   "wms_format" "image/tif"
  END
  PROJECTION
  "init=epsg:28355"
 END
 END
 LEGEND
  KEYSIZE 12 12
  STATUS EMBED
  POSITION lr
  IMAGECOLOR 125 125 125
  LABEL
   COLOR 255 255 255
   FONT "verdana"
   TYPE TRUETYPE
   POSITION AUTO
   PARTIALS FALSE
   SIZE 8
   BUFFER 1
  END
 END
END 
 
Here is my capabilities report: 
 

http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd";
 [
 
 ]>  
 

 

 

  OGC:WMS
  WMS Demo
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>

 

  
    
  application/vnd.ogc.wms_xml
  
    
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
    
  
    
    
  image/gif
  image/png
  image/png; mode=24bit
  image/jpeg
  image/vnd.wap.wbmp
  image/tiff
  image/svg+xml
  
    
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
    
  
    
    
  text/plain
  application/vnd.ogc.gml
  
    
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
    
  
    
    
  text/xml
  
    
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
    
  
    
    
  image/gif
  image/png
  image/png; mode=24bit
  image/jpeg
  image/vnd.wap.wbmp
  
    
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
    
  
    
    
  text/xml
  
    
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
  http://www.w3.org/1999/xlink"; 
xlink:href="http://test/cgi-bin/mapserv.exe?map=E:\mapfiles\wmstest4.map&"/>
    
  
    
  
  
    application/vnd.ogc.se_xml
    application/vnd.ogc.se_inimage
    application/vnd.ogc.se_blank
  
  
  
  
    WMSQuick
    WMS Demo
    EPSG:28355
    
    
    
    AdminCountries
    admin_countries
    EPSG:28355
    
    
    
  



 
Am I missing something vital? I am able to add the WMS layers in arcmap, but 
the canvas is blank. 
 
Thanks in advance. 
Jess
 



-Inline Attachment Follows-

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

Re: [mapserver-users] still have problem when add postgis layer on mapserver mapfile

2012-08-26 Thread pcreso


I assume the getcapabilities request is working OK?

What happens when you open this in your browser:
http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map?service=WMS&version=1.3.0&request=getcapabilities

& what happens if you initialise the CRS in the mapfile with just the epsg code 
instead of the full WKT?

I assume you are looking to do something like this?
http://121.73.69.119/osm_nz.html


Cheers,

   Brent Wood

--- On Mon, 8/27/12, Henrique Rennó  wrote:

From: Henrique Rennó 
Subject: Re: [mapserver-users] still have problem when add postgis layer on 
mapserver mapfile
To: "李杨" 
Cc: mapserver-...@lists.osgeo.org, mapserver-users@lists.osgeo.org
Date: Monday, August 27, 2012, 4:56 AM

It seems your url is set wrong as mode is given twice. You have to pass 
layer=layer_name
2012/8/26 李杨 

I try to load a postgis data layer on my mapfile, have problem when configure 
the mapfile done, then visit it using 
"http://127.0.0.1/cgi-bin/mapserv?&map=/var/www/osm-google.map&mode=map&mode=map";
 on the browser address. , only a blank blue image return, with no expected dot 
info.



I can not figure out which step is have problem.

Provide background info:

ogrinfo for the database  table:

jack@jack-Vostro-1450:/usr/lib/cgi-bin$ ogrinfo PG:"host=127.0.0.1 user=osm  
password=osm dbname=osm port=5432" osm_new_mainroads -summary


INFO: Open of `PG:host=127.0.0.1 user=osm  password=osm dbname=osm port=5432'
  using driver `PostgreSQL' successful.

Layer name: osm_new_mainroads
Geometry: Line String
Feature Count: 9704


Extent: (-9871463.421196, 3533052.471384) - (-9460289.228784, 4190971.740014)
Layer SRS WKT:
PROJCS["Popular Visualisation CRS / Mercator (deprecated)",
    GEOGCS["Popular Visualisation CRS",


    DATUM["Popular_Visualisation_Datum",
    SPHEROID["Popular Visualisation Sphere",6378137,0,
    AUTHORITY["EPSG","7059"]],
    TOWGS84[0,0,0,0,0,0,0],


    AUTHORITY["EPSG","6055"]],
    PRIMEM["Greenwich",0,
    AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.01745329251994328,


    AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4055"]],
    UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],
    PROJECTION["Mercator_1SP"],


    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    AUTHORITY["EPSG","3785"],


    AXIS["X",EAST],
    AXIS["Y",NORTH]]
FID Column = id
Geometry Column = geometry
osm_id: Integer (0.0)
name: String (255.0)
type: String (255.0)
tunnel: Integer (5.0)
bridge: Integer (5.0)


oneway: Integer (5.0)
ref: String (255.0)
z_order: Integer (5.0)
jack@jack-Vostro-1450:/usr/lib/cgi-bin$ 


.map(uing in the link above : osg-google.map) info for configure:



MAP
NAME places1
STATUS ON
SIZE 800 800
EXTENT -9871463.421196 3533052.471384 -9460289.228784 4190971.740014
UNITS meters
IMAGECOLOR 153 179 204


WEB
    IMAGEPATH "/var/www/output"


    IMAGEURL "/output/"
END

LAYER
 STATUS DEFAULT
 NAME "places1"
 DATA "geometry from osm_new_mainroads using unique osm_id using srid 3785"
 TYPE POINT
 CONNECTIONTYPE postgis


 CONNECTION "host=localhost dbname=osm user=osm password=osm port=5432"
 CLASS
NAME "places1_color"
COLOR 255 215 0
  END
END

END

-
for a explanation , whenever set  "DATA "geometry from osm_new_mainroads using 
unique osm_id using srid 3785"",


DATA "geometry from osm_new_mainroads", or 
DATA "geometry from osm_new_mainroads using unique osm_id using srid 3875

is the same , a blank image return
---


massperv version info:

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





I try to experiment it in two different laptop and can not get expected result.

Please those with experience help me., this problem qurrall  me a lot this 
weeked.

Thanks a lot. 



-- 

Yang LiGIS DeveloperP.R.China



___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users





-- 
Henrique




-Inline Attachment Follows-

___
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] Scripted geoprocessing

2012-06-05 Thread pcreso
Hi Sam,

Define "simpler" :-)

I could do it in Postgis with a few lines of script, but you'd need to install 
Postgis.

Postgis essentially has the code already written, you just need to deploy it. 
Other approaches may require less in the way of installation & more in the way 
of writing your own code...

On a Linux box, especially a mainstream distro, Postgis is trivial to install & 
manage, so it would be hard to be simpler. If you need to compile, etc, then 
there are other ways that could be simpler.

Cheers,

  Brent

--- On Wed, 6/6/12, Lime, Steve D (DNR)  wrote:

From: Lime, Steve D (DNR) 
Subject: Re: [mapserver-users] Scripted geoprocessing
To: "Sam Skinner" , "mapserver-users@lists.osgeo.org" 

Date: Wednesday, June 6, 2012, 5:01 AM

Hi Sam: MapScript does have GEOS functions built into it so you might be able 
to use just those. I remember doing something along these line using Perl 
MapScript. I don't have the script handy but I think I used a hash of shapes 
based on the attribute value in question. For each shape you simple add all the 
parts to the right hash element. Could either use the Union operator or just 
add the parts. Then once you have processed every feature in the shapefile(s) 
you do a buffer(0) on each of the hash elements with I think effectively does a 
dissolve. Of course you need to save the dissolved shape someplace too. In Perl 
this is not a very long script: a loop to build the hash of shapes and another 
loop to process the hash.

Steve 

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Sam Skinner
Sent: Friday, June 01, 2012 6:34 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Scripted geoprocessing

Hi all,
I am writing a python script that will (weekly) download and extract data 
(shapefiles) from an organization without a WMS or WFS. This script will reside 
on my linux-based mapserver (5.6). I am looking for a way for this script to 
dissolve polygons with a common attribute. This will help rendering speed and 
ease of visualization. Any ideas on how I could do this? From what I understand 
(which isn't much!), I could import the data into PostGIS, then run some query 
there. Is there a simpler way? Is anyone familiar with Sextante, and would that 
work?

Thanks!

--
Sam Skinner (Mapserver admin and newbie) Yukon Land Use Planning Council


___
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] RE: WFS set up

2012-05-23 Thread pcreso
Not sure about the compilation problem, I have used prebuilt packages for years 
now...

Regarding the error message, see http://mapserver.org/mapfile/web.html 

You still need an HTML template file specified, even if you don't use it. The 
file does not need to exist, unless you do use it.

--- On Thu, 5/24/12, Alberto Najera  wrote:

From: Alberto Najera 
Subject: [mapserver-users] RE: WFS set up
To: "'mapserver-users'" 
Date: Thursday, May 24, 2012, 1:07 PM

Hi all

I have checked this all over again and the problem seems to be caused by the
mapserv cgi  build. I have configured it using "--with-wfs" and when done,
the response shows 

WFS Server: -DUSE_WFS_SVR

as expected, confirming this feature to be enabled in the build.

I then run "make" and when testing the supported features with ./mapserv -v,
it shows no support for WFS.  
Also when running the capabilities test, I got this response:

"mapserv(): Web application error. Traditional BROWSE mode requires a
TEMPLATE in the WEB section, but none was provided. msOWSDispatch(): WFS
server error. SERVICE=WFS requested, but WFS support not configured in
MapServer."

Why is this happening?

I am using Mapserver 6.0.1 in a Centos5 environment.   Could this be a bug
in Mapserver or am I missing something here?


Your help is greatly appreciated  

Alberto Najera

-Mensaje original-
De: Alberto Najera [mailto:anaj...@bicimapas.com.mx] 
Enviado el: martes, 22 de mayo de 2012 12:06 p.m.
Para: 'mapserver-users'
Asunto: WFS set up

Hello

I am setting up a map file for WFS access but I do not get a response when
testing for capabilities, just a 404 error.  Following the guidelines in the
Mapserver documentation, the CGI was compiled using "-with-wfs" and  I am
using this URL to test capabilities:


___
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 base layers

2012-05-14 Thread pcreso
For a simple example of OSM data, running on OpenSuse rather than Ubuntu, with 
the Oceania OSM data, try http://121.73.69.119/osm_nz.html

Might help you decide if this is worth following up for your purposes.

Cheers

Brent Wood

--- On Tue, 5/15/12, Daniel Morissette  wrote:

From: Daniel Morissette 
Subject: Re: [mapserver-users] wms base layers
To: mapserver-users@lists.osgeo.org
Date: Tuesday, May 15, 2012, 2:25 AM

On 12-05-14 9:42 AM, Stephen Woodbridge wrote:
> On 5/14/2012 5:31 AM, Rita Abreu wrote:
>> Hi,
>>
>> I´m a new user of mapserver.
>> Can anyone recomend me base layers for my project?
>> Can somenoe tell me how to add google layers or osm layers?
>
[...]
>
> If you really are asking how to pull OSM or Google into mapserver,
> instead of OpenLayers, then you will need to extract the OSM data into
> data layers and create a mapfile to render it in mapserver OR find an
> existing WMS service that you can pull OSM images into mapserver. You
> can not do this with Google it violates their TOS.
>

For a step by step recipe to load and render OSM with MapServer, see:

https://github.com/mapserver/mapserver/wiki/RenderingOsmDataUbuntu

-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000

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


[mapserver-users] how to embed images in a map

2012-05-11 Thread pcreso
Hi, 

I'm trying to embed graphics in a map. A map with polygons, & each polygon has 
a logo or small graph to include at a specified location (point) in the output 
map.

Can anyone suggest the best way to do this?

The map is a WMS output layer, & ideally it should be generated as a layer in a 
mapfile?

I guess a CGI could use image magic to do this on top of the map image, but I'm 
looking for a way Mapserver could do this directly.


Thanks,

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


Re: [mapserver-users] Re: handling features that cross the date line

2012-05-04 Thread pcreso
Hi Puneet,

One way is to reproject.
Another is to shift longitudes  to 0-360 instead of +-180
Another is to select your dataset, unioned to itself shifted 360 degrees in the 
mapserver data statement

the Postgis function ST_shiftlongitude can help.

One example is to switch on one of the Biodiversity layers at: 
http://www.os2020.org.nz/project-map-chatchallenger/

These are all mapserver WMS layers crossing 180 degrees. provided by mapserver 
& displayed with OpenLayers.

There is an issue, in that if the map pans to either side of 180, the entire 
layer is redrawn, but at least the map looks correct.

Cheers,

  Brent Wood


--- On Sat, 5/5/12, Puneet Kishor  wrote:

From: Puneet Kishor 
Subject: [mapserver-users] Re: handling features that cross the date line
To: "mapserver" 
Date: Saturday, May 5, 2012, 1:21 PM

bumpety bump. The following page discusses the issue, but I am not sure what 
the resolution is. I'd preferably solve this without having to edit the lines.

Suggestions?

On Apr 30, 2012, at 8:49 PM, Puneet Kishor wrote:

> What is the recommended way of handling such features? I have a bunch of 
> lines (held in Postgis) that cross the date line, and the WMS tiles drawn by 
> MapServer get all messed up. What is the easiest way to get them to draw 
> correctly?
> 
> Thanks.
> 
> 
> 
> --
> 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] Open Layers Problem

2012-04-27 Thread pcreso
Hi Alberto, 

I can get the capabilities document, & a list of available layers, using the 
WMS facility in Quantum GIS, but when I try to access/load the layers as a map 
the request fails:

"Response: 
MapServer Message


msLoadMap(): Unable to access file. 
(http://173.236.45.118/home/bicimapas/mapdata/BiciMapasMS.map)
"
I suggest that having your mapfile in your home directory tree rather than your 
webserver's directory tree might be the problem.
You might also try tools like uDIG or QGIS to access the WMS service & debug it 
before you try to get it working with OpenLayers.
Cheers,
   Brent Wood


--- On Sat, 4/28/12, Alberto Najera  wrote:

From: Alberto Najera 
Subject: RE: [mapserver-users] Open Layers Problem
To: mapserver-users@lists.osgeo.org
Date: Saturday, April 28, 2012, 11:25 AM

Thanks,

I used this

http://173.236.45.118/cgi-bin/mapserv?map=BiciMapasMS.map&SERVICE=WMS&;
> VERSIO
> N=1.1.1&REQUEST=GetCapabilities
>
> and get this message
>
> msLoadMap(): Unable to access file. (BiciMapasMS.map)
>
> Why would the map file not be accessible to openlayers while Mapserver 
> can access it?  Is it a permissions or a path definition problem?
>
> Any hel os appreciated. Thanks
>
>
> Alberto Najera
>
>
> -Mensaje original-
> De: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] En nombre de Alberto 
> Najera Enviado el: viernes, 27 de abril de 2012 01:19 p.m.
> Para: mapserver-users@lists.osgeo.org
> Asunto: [mapserver-users] Open Layers Problem
>
> Hello
>
> We have a map that is rendered well using the Mapserver template and 
> are trying to use it with OpenLayers but are experiencing some 
> problems as the map does not show and I cannot find why.
>
> We are using a Linux Centos 5 remote server and the map file is 
> located in home/bicimapas/mapdata/BiciMapasMS.map and the Mapserver 
> CGI  is located in /home/bicimapas/cgi-bin/mapserv. The IP address is  
> 173.236.45.118
>
> On the map file we added this Metadata lines under the WEB section
>
> METADATA
>      "wms_title" "BiciMapasMS"
>      "wms_onlineresource"
> "___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] elevation profile

2012-04-27 Thread pcreso
Hi Puneet

I suggest you use GMT - the best open source cartographic & grid analysis tool 
available!  http://gmt.soest.hawaii.edu

you may need your SRTM surface as a GMT netCDF grid, which GDAL supports 
nicely, or you may be able to describe your SRTM grid for GMT to use natively - 
I'm not sure

the project command will generate your line, with sample points along it as 
straight or great circle lines between end points

grdtrack will turn your XY line coordinates into xyz values, with the Z values 
derived from your SRTM grid

psxy will gernerate a nicely annotated graphic (postscript) showing your profile
psxyz can (alternatively) render your profile in 3d space (overlaid on a 3D 
perspective view of the surface if required)

ps2raster will convert to a raster image such as png. 

This can easily be wrapped up in a cgi if required.

Cheers,

    Brent Wood

--- On Fri, 4/27/12, Puneet Kishor  wrote:

From: Puneet Kishor 
Subject: Re: [mapserver-users] elevation profile
To: "Stephen Woodbridge" 
Cc: mapserver-users@lists.osgeo.org
Date: Friday, April 27, 2012, 2:49 PM


On Apr 26, 2012, at 7:20 PM, Stephen Woodbridge wrote:

> On 4/26/2012 7:35 PM, Puneet Kishor wrote:
>> Any suggestions on how something like this could be implemented using 
>> MapServer?
>> 
>> http://viewer.nationalmap.gov/example/elevation_profile.html
>> 
>> 
>> My front-end is OpenLayers, and the backend data are from SRTM. I'd like to 
>> click on the map and create a line, and get back the elevation numbers for 
>> that line. I only want the elevation numbers as I can optionally construct 
>> the profile via a variety of ways.
>> 
>> I am assuming I could send a line WKT, but how would I query for the values 
>> using MapServer?
>> 
>> Fwiw, 
>> http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html
>>  seems to use a canvas implementation that doesn't seem to be available in 
>> my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` 
>> croaks with "not a function" message. In any case, I don't really want the 
>> RGB values under the mouse. I want the actual height values.
>> 
>> Thanks in advance for any suggestions,
> 
> Hi Puneet,
> 
> I have done this in the past and there are a bunch of moving parts. Here is 
> what I did.
> 
> 1. got a copy of NED2 data for the US.
> 2. create a gdal .vrt file to pull all the files into a single virtual file
> 3. wrote a simple C fcgi program to take an x,y and get the elevation from 
> the the NED2 data.
> 
> http://imaptools.com:8080/cgi-bin/getElevation.fcgi?lat=32.6628646&lon=-86.8800962
> 
> 4. I used pgRouting to compute a route and then took the route geometry and 
> added sample point along the edges where needed, and hit the fcgi service to 
> convert the points to elevations and then plotted the elevations against the 
> their length along the line that the x,y represented.
> 
> I also think I may have wrote an app where you could pass the route polyline 
> to it an it would generate an image of the elevation plot.
> 
> 5. Then wired it into the web page as an ajax call of as a image url that 
> gets updated.
> 



Thanks for the details, Steve. All this is way more complicated that I was 
envisioning. And, PostGIS 2 is out of the question, for now, at least.

Could you send me that gdal .vrt file? I'd like to look at it. Perhaps that 
will give me some other ideas on how to approach this.

Many thanks,


--
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] WMS Speed vs Direct URL

2012-04-07 Thread pcreso
Is OL accessing via a tile cache whereas the direct URL is rendering on the 
fly? 

On 4/7/2012 5:11 PM, Andrew Revering wrote:
> I'm curious if anyone knows why WMS is SOOO much faster when I am
> loading my maps through a map (OpenLayers) than it is when I just try to
> pull a single tile directly through my brower and a WMS url?
>
> It seems like the server takes forever when I just enter a WMS URL into
> my browser's address bar, but when I load the same WMS map through
> OpenLayers its so much faster, despite loading all those seperate tiles
> individually instead of just the one I'm requesting in the browser.
>
> Any ideas?

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


Re: [mapserver-users] Base map data for WMS

2012-03-08 Thread pcreso
Bulk downloads are indeed discouraged, but setting up your own OSM database 
(imposm, osmosis, etc...) from downloaded OSM data, & creating a locally cached 
tileset from these data is supported, if not encouraged.

Brent Wood

--- On Thu, 3/8/12, thomas bonfort  wrote:

From: thomas bonfort 
Subject: Re: [mapserver-users] Base map data for WMS
To: "Paolo Corti" 
Cc: mapserver-users@lists.osgeo.org
Date: Thursday, March 8, 2012, 4:43 AM

On Wed, Mar 7, 2012 at 16:23, Paolo Corti  wrote:
>>
>> One of the mentioned constraints was offline usage...
>>
>
> yes, but it is possible to pre-generate the tiles, though not sure if
> this is feasible on just one server for the whole OSM dataset, but
> maybe for much simpler datasets would be the way to go
> P

By "pregenerate" I suppose you mean pre-download from the osm servers?
This in the general case is prohibited by osm's TOS :
http://wiki.openstreetmap.org/wiki/Tile_usage_policy

>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
___
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: WMS for netcdf [SEC=UNCLASSIFIED]

2012-03-04 Thread pcreso
Hi,

One advantage of having mapserver run as a cgi, is it is relatively easy to 
have a cgi script wrapper to enable such variable substitution by generating a 
modified mapfile then invoking mapserver to use this.

Not necessarily the most efficient way, but very effective.

A simple example would read the appropriate substring from the URL querystring,
create a new mapfile with something like:
cat  | sed 's///' > 
& fire off mapserver with the new mapfile

Maybe not ideal for lots of concurrent users, but adequate for some 
circumstances, & may work for you?


Cheers,

   Brent Wood

--- On Mon, 3/5/12, teknocreator  wrote:

From: teknocreator 
Subject: [mapserver-users] RE: WMS for netcdf [SEC=UNCLASSIFIED]
To: mapserver-users@lists.osgeo.org
Date: Monday, March 5, 2012, 4:19 AM

Kathleen,

I've searched through the lists and on the web for an answer to your issue
as I have it too only with GRIB data.  The MapServer docs seem to indicate
that variable substitution won't work for the PROCESSING directive. 
Therefore I tried several variations "Changing map file parameters via a
form or a URL".  What should've worked here considering that part of the
documentation is to add this to the GetMap request string:

map[layer].processing[0]="BANDS=01" 

because it was the first PROCESSING directive for my layer and it needs a
string for the directive.  But, I received an msloadLayer error.  I tried a
few variations but all ended up with the same error.  I've seen folks have a
similar issue with this in the MS Users list with no solution at present.

While what Puneet wrote may be a solution for you and possibly our GRIB data
as well, it seems like a much more complicated way just to get at a
particular band in the file.  I do see why this has been done as NetCDF does
come in many flavors and there's the possibility of 4 dimensions in the
file.  There are many links on using WCS with NetCDF, a good number coming
from UCAR.

Still, this looks like a possible code problem where the ability to change
map file parameter via a URL does not work in this case or else the ability
to change BANDS needs to be added to variable substitution.  

Hopefully, someone from MapServer can help here.  Looks like I'm going to be
investigating WCS, though.  I'll definitely be checking back on this one.

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/WMS-for-netcdf-SEC-UNCLASSIFIED-tp4519496p4545262.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] Setup advice please?

2012-03-02 Thread pcreso
Hi Puneet,

Yep, a simple one off 50Gb image dataset to be configured & then the cache 
populated dynamically. I'd prefer MapProxy, or Mapcache, over Tilecache, to be 
able to support GetFeature requests, but in this instance that will not be 
needed anyway.

That's about my take on it, maybe a couple of hours, but I've just been quoted 
3 days by a support team to do this, at NZ$170/hr. (current exch rate is around 
.77, so maybe $2600US??? for the job) 

I'm not a professional at this, but do such things as a prototyping & playing 
exercise at home... & a formal installation will need documenting, etc, to a 
production server standard, so perhaps a few more hours, but that cost seems 
excessive. 

Hence my question here, to get an "expert" opinion of what such a setup should 
cost. Ideally a few such opinions to give me a robust sample size to go back 
with :-)

I've also asked another provider for a cost. My guess is they will be 
considerably cheaper.



--- On Sat, 3/3/12, Puneet Kishor  wrote:

From: Puneet Kishor 
Subject: Re: [mapserver-users] Setup advice please?
To: "mapserver" 
Date: Saturday, March 3, 2012, 3:15 PM

Just walked into this conversation so my response may be half-assed, but...

On Mar 2, 2012, at 7:26 PM, pcr...@pcreso.com wrote:

> Cheers Steve.
> 
> I don't think this changes the answer much... whether mapcache, tilecache or 
> mapproxy is used, the time to set up a working server with 50Gb of geotiffs I 
> would have thought would be pretty similar.
> 
> So: can anyone experienced in this area suggest what sort of time is 
> reasonable to expect a competent team to set this up in a professional 
> way, with reasonable supporting docs, etc? Remembering we have a 
> supported server to work with.



What do you mean by "time... to set up" a server? Fwiw, I downloaded, 
configured, and had Tilecache working in less than 30 mins. The cache is not 
pre-seeded. It builds up as it goes.






> 
> Thanks,
> 
>    Brent Wood
> 
> --- On Sat, 3/3/12, Lime, Steve D (DNR)  wrote:
> 
> From: Lime, Steve D (DNR) 
> Subject: RE: [mapserver-users] Setup advice please?
> To: "pcr...@pcreso.com" , "Corey Carpenter" 
> 
> Cc: "mapserver-users@lists.osgeo.org" 
> Date: Saturday, March 3, 2012, 1:15 PM
> 
> MapServer 6.2 isn't ready for production use, however, MapCache is. I've been 
> pairing it and 6.0.2 for production use for months... Just another opinion. 
> -Steve
> 
> From: mapserver-users-boun...@lists.osgeo.org 
> [mapserver-users-boun...@lists.osgeo.org] on behalf of pcr...@pcreso.com 
> [pcr...@pcreso.com]
> Sent: Friday, March 02, 2012 2:09 PM
> To: Corey Carpenter
> Cc: mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] Setup advice please?
> 
> Hi Corey,
> 
> Thanks for the suggestion.
> 
> At this stage the requirement is for a stable production system. Mapserver 
> 6.2 & mapcache  are not, still being under development.
> 
> I realise that this does not preclude the software running robustly, but it 
> will not be an acceptable solution in this case. Mapserver 6.01, as the 
> latest stable release, is the required platform.
> 
> Hence my suggestion of Tilecache & MapProxy as suitable applications, which 
> are available as binary packages ready to install.
> 
> 
> Thanks,
> 
>   Brent Wood
> 
> --- On Sat, 3/3/12, Corey Carpenter  wrote:
> 
> From: Corey Carpenter 
> Subject: Re: [mapserver-users] Setup advice please?
> To: pcr...@pcreso.com
> Cc: mapserver-users@lists.osgeo.org
> Date: Saturday, March 3, 2012, 8:40 AM
> 
> Unless I read your question incorrectly, this is the main function of 
> mapcache. You will need to use a fairly new version of mapserver 6.2 / trunk. 
> You will be able to seed your cache, so the tiles you define are available on 
> the first request.
> 
> I have used tilecache and other methods, but I have no experience with 
> mapcache.
> 
> On Fri, Mar 2, 2012 at 1:10 PM, 
> > wrote:
> Hi,
> 
> Hopefully someone here can help.
> 
> I have about 50Gb of high resolution aerial photos (geotiffs) to set up as a 
> cached WMS service.
> 
> We have a mapserver setup ready to use, with backups, etc. already sorted. 
> The dataset is competely static.
> 
> I'd like to set up MapProxy or Tilecache as a tiled WMS service for an 
> OpenLayers front end, and possible other public use.
> 
> I'm happy with a dynamically populated cache, rather than a pre-filled one, 
> so the cache is built up as it is used.
> 
> Can anyone experienced in this area suggest what sort of time is reasonable 
> to expect a competent team to set this up in a professional way, with 
> reasonable supporting docs, etc? Remembering we have a supported server to 
> work with.
> 
> It has been asked for by a small local environmental interest group with zero 
> funds, and I need to get a reasonable commercial cost for such an exercise to 
> start with.
> 
> Thanks,
> 
>    Brent Wood
> 
> ..

___
maps

RE: [mapserver-users] Setup advice please?

2012-03-02 Thread pcreso
Cheers Steve.

I don't think this changes the answer much... whether mapcache, tilecache or 
mapproxy is used, the time to set up a working server with 50Gb of geotiffs I 
would have thought would be pretty similar.

So: can anyone experienced in this area suggest what sort of time is 
reasonable to expect a competent team to set this up in a professional 
way, with reasonable supporting docs, etc? Remembering we have a 
supported server to work with.

Thanks,

   Brent Wood

--- On Sat, 3/3/12, Lime, Steve D (DNR)  wrote:

From: Lime, Steve D (DNR) 
Subject: RE: [mapserver-users] Setup advice please?
To: "pcr...@pcreso.com" , "Corey Carpenter" 

Cc: "mapserver-users@lists.osgeo.org" 
Date: Saturday, March 3, 2012, 1:15 PM

MapServer 6.2 isn't ready for production use, however, MapCache is. I've been 
pairing it and 6.0.2 for production use for months... Just another opinion. 
-Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of pcr...@pcreso.com 
[pcr...@pcreso.com]
Sent: Friday, March 02, 2012 2:09 PM
To: Corey Carpenter
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Setup advice please?

Hi Corey,

Thanks for the suggestion.

At this stage the requirement is for a stable production system. Mapserver 6.2 
& mapcache  are not, still being under development.

I realise that this does not preclude the software running robustly, but it 
will not be an acceptable solution in this case. Mapserver 6.01, as the latest 
stable release, is the required platform.

Hence my suggestion of Tilecache & MapProxy as suitable applications, which are 
available as binary packages ready to install.


Thanks,

  Brent Wood

--- On Sat, 3/3/12, Corey Carpenter  wrote:

From: Corey Carpenter 
Subject: Re: [mapserver-users] Setup advice please?
To: pcr...@pcreso.com
Cc: mapserver-users@lists.osgeo.org
Date: Saturday, March 3, 2012, 8:40 AM

Unless I read your question incorrectly, this is the main function of mapcache. 
You will need to use a fairly new version of mapserver 6.2 / trunk. You will be 
able to seed your cache, so the tiles you define are available on the first 
request.

I have used tilecache and other methods, but I have no experience with mapcache.

On Fri, Mar 2, 2012 at 1:10 PM, 
> wrote:
Hi,

Hopefully someone here can help.

I have about 50Gb of high resolution aerial photos (geotiffs) to set up as a 
cached WMS service.

We have a mapserver setup ready to use, with backups, etc. already sorted. The 
dataset is competely static.

I'd like to set up MapProxy or Tilecache as a tiled WMS service for an 
OpenLayers front end, and possible other public use.

I'm happy with a dynamically populated cache, rather than a pre-filled one, so 
the cache is built up as it is used.

Can anyone experienced in this area suggest what sort of time is reasonable to 
expect a competent team to set this up in a professional way, with reasonable 
supporting docs, etc? Remembering we have a supported server to work with.

It has been asked for by a small local environmental interest group with zero 
funds, and I need to get a reasonable commercial cost for such an exercise to 
start with.

Thanks,

   Brent Wood


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




--
___
Any use, dissemination, distribution, posting on Internet bulletin boards, 
disclosure or copying of this e-mail or any information contained herein by or 
to anyone other than the intended recipient(s) is strictly prohibited. Use of 
this content for any other purpose is a violation of International Copyright 
Laws.



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


Re: [mapserver-users] Setup advice please?

2012-03-02 Thread pcreso
Hi Corey,

Thanks for the suggestion.

At this stage the requirement is for a stable production system. Mapserver 6.2 
& mapcache  are not, still being under development.

I realise that this does not preclude the software running robustly, but it 
will not be an acceptable solution in this case. Mapserver 6.01, as the latest 
stable release, is the required platform.

Hence my suggestion of Tilecache & MapProxy as suitable applications, which are 
available as binary packages ready to install.


Thanks,

  Brent Wood

--- On Sat, 3/3/12, Corey Carpenter  wrote:

From: Corey Carpenter 
Subject: Re: [mapserver-users] Setup advice please?
To: pcr...@pcreso.com
Cc: mapserver-users@lists.osgeo.org
Date: Saturday, March 3, 2012, 8:40 AM

Unless I read your question incorrectly, this is the main function of mapcache. 
You will need to use a fairly new version of mapserver 6.2 / trunk. You will be 
able to seed your cache, so the tiles you define are available on the first 
request.


I have used tilecache and other methods, but I have no experience with 
mapcache. 

On Fri, Mar 2, 2012 at 1:10 PM,   wrote:

Hi,

Hopefully someone here can help.


I have about 50Gb of high resolution aerial photos (geotiffs) to set up as a 
cached WMS service.

We have a mapserver setup ready to use, with backups, etc. already sorted. The 
dataset is competely static.


I'd like to set up MapProxy or Tilecache as a tiled WMS service for an 
OpenLayers front end, and possible other public use.

I'm happy with a dynamically populated cache, rather than a pre-filled one, so 
the cache is built up as it is used. 


Can anyone experienced in this area suggest what sort of time is reasonable to 
expect a competent team to set this up in a professional way, with reasonable 
supporting docs, etc? Remembering we have a supported server to work with.


It has been asked for by a small local environmental interest group with zero 
funds, and I need to get a
 reasonable commercial cost for such an exercise to start with.

Thanks,

   Brent Wood

___

mapserver-users mailing list

mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users





-- 
___
Any use, dissemination, distribution, posting on Internet bulletin 
boards, disclosure or copying of this e-mail or any information 
contained herein by or to anyone other than the intended recipient(s) is
strictly prohibited. Use of this content for any other purpose is a violation 
of International Copyright Laws.


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


[mapserver-users] Setup advice please?

2012-03-02 Thread pcreso
Hi,

Hopefully someone here can help.

I have about 50Gb of high resolution aerial photos (geotiffs) to set up as a 
cached WMS service.

We have a mapserver setup ready to use, with backups, etc. already sorted. The 
dataset is competely static.

I'd like to set up MapProxy or Tilecache as a tiled WMS service for an 
OpenLayers front end, and possible other public use.

I'm happy with a dynamically populated cache, rather than a pre-filled one, so 
the cache is built up as it is used. 

Can anyone experienced in this area suggest what sort of time is reasonable to 
expect a competent team to set this up in a professional way, with reasonable 
supporting docs, etc? Remembering we have a supported server to work with.

It has been asked for by a small local environmental interest group with zero 
funds, and I need to get a reasonable commercial cost for such an exercise to 
start with.

Thanks,

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


Re: [mapserver-users] Trouble connecting to PostGIS

2012-02-13 Thread pcreso
Hi Bob,


I suggest you try testing with QGIS.

Easy to open the native postgis table & a mapserver WFS/WMS layer concurrently 
to ensure it is all working as it should.

Also ensure you have configured your Postgis (Postgres) database to allow 
applications such as mapserver to connect. For testing purposes, set access to 
the database to trusted for all in pb_hba.conf, & enable external connections 
in postgresql.conf, then restart the server to ensure the changes are activated.

You can also enable mapserver debugging & specify a log file to see what error 
is reported.
http://mapserver.org/optimization/debugging.html

You may also need to specify the unique ID column name & the SRID you are using 
in your DATA string, much like this one:
DATA "track_line from (select * from trip_track where trip_code = 'ind0701') as 
foo using unique id using srid 4326"

HTH,

   Brent Wood

--- On Tue, 2/14/12, Bistrais, Bob  wrote:

From: Bistrais, Bob 
Subject: [mapserver-users] Trouble connecting to PostGIS
To: mapserver-users@lists.osgeo.org
Date: Tuesday, February 14, 2012, 10:11 AM




 
 










First of all, let me state that I am brand new to PostGIS
and don’t know much about what I’m doing with it.  That being said,
I am having trouble displaying a PostGIS layer through MapServer. 

   

Right now I’m just experimenting with PostGIS and
simply trying to get a layer to display.  I installed the Postgre and PostGIS
1.5.  I used the shapefile loader to convert a couple shapefiles to PostGIS
data.  Looking in pgAdmin, I see the tables do indeed exist for these layers. 

   

So I built a MapServer map file.  Here is my connection
strings: 

   

DATA "the_geom from MylayerPoly" 

CONNECTION "user=postgisuser password=MyPassword!
dbname=postgistest host=localhost port=5432" 

CONNECTIONTYPE postgis 

   

But the layer does not display.  Incidentally, I’m
using GeoMoose as a front end for testing, but that shouldn’t matter
here. 

   

I did a mapserv –v at commandline, and I see the
parameter INPUT=POSTGIS. 

   

So as far as I know it should work. Can anyone offer
suggestions as to what I’m doing wrong? 

   

Thanks, 

Bob 







-Inline Attachment Follows-

___
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] How to read PostGIS data & display into Openlayers?

2012-02-10 Thread pcreso

I would suggest you use a WMS/WFS service by using Geoserver or mapserver on 
top of your Postgis database, then connect to the web service with OpenLayers.

Cheers,

   Brent Wood



--- On Fri, 2/10/12, Vivaldi Al Barado  wrote:

From: Vivaldi Al Barado 
Subject: [mapserver-users] How to read PostGIS data & display into Openlayers?
To: "thomas bonfort" , "John Taranu" 

Cc: "mapserver-users@lists.osgeo.org" 
Date: Friday, February 10, 2012, 10:27 PM

   Is there someone that can give an example 
of how to access a PostGIS database from openlayer 
and then displays it to the openlayer?

Best regards
Gozali

-Inline Attachment Follows-

___
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] Mapfile Generators

2012-02-03 Thread pcreso
Hi Paul,

QGIS has such a tool, I'm not sure about Arc.

You should be able to handcraft a generic mapfile as a template you can re-use 
as required. I had a use case some time ago for this sort of thing & used a 
Linux shell script to make the text substitutions in such a template from 
reading a spreadsheet containing the mapfile parameters required for each 
individual shapefile.

These days I tend to manage data in Postgis, & use a filter or mapserver's 
variable substitution to manage such situations.

Using a single mapfile with cgi wrappers to re-use it in this way for different 
datasets works better for me than maintaining lots of separate mapfiles.

In a couple of situations where this is not flexible enough, having a cgi 
actually contain the mapfile text, so it writes the customised mapfile, then 
invokes it, also works for me.

Cheers,
   
   Brent Wood


--- On Sat, 2/4/12, Paul Maddock  wrote:

From: Paul Maddock 
Subject: [mapserver-users] Mapfile Generators
To: "mapserver-users@lists.osgeo.org" 
Date: Saturday, February 4, 2012, 2:49 AM

Hi all,  Are there any extensions of ArcView 10 which I can export .shp files 
into mapfiles or possibly any other open source mapfile generators?  It seems 
time consuming to manually create these map files if I have a large collection 
of shapefiles.   Many thanks,Paul
-Inline Attachment Follows-

___
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] zoom to place by name

2012-01-30 Thread pcreso
Provided your use complies with the terms of the Google terms of use, you could 
probably develop an app based on the public Google API.

I figure your proposal essentially involves two steps: 
 develop a public database of placenames & extents 
 provide a service enabling the easy reuse of these data for zooming 
functionality


Note that Google solutions are somewhat arbitrary, so that Chinese placenames 
in Tibet (for example) do not exist in the Indian Google service, and vice 
versa for the Chinese Google service. Similar local variations occur elsewhere, 
so while Google does have a global dataset, it is not implemented as such, but 
as local variants. This is needed to comply with legislative requirements in 
different countries.

An "open global" solution that did not support these political idiosyncrasies 
would be illegal to use in some countries. 

Brent Wood


--- On Tue, 1/31/12, Mr. Puneet Kishor  wrote:

From: Mr. Puneet Kishor 
Subject: [mapserver-users] zoom to place by name
To: mapserver-users@lists.osgeo.org
Date: Tuesday, January 31, 2012, 4:14 PM

a'ite, this question is neither mapserver-specific nor OL-specific (two 
technologies that I am using gung-ho right now), but both would be involved in 
developing something that I describe below --

you know, how in Google Maps you can type pretty much any location's name, and 
if it finds a match in its database, Google Maps zooms to the boundary of that 
location. For example, if I type 

    http://maps.google.com/maps?q=Zurich,+Switzerland

or 

    http://maps.google.com/maps?q=Dane+County,+WI

or 

    http://maps.google.com/maps?q=New+York+City

the map zooms to the bounds of that location. This is what I want to develop, 
for the entire world. I guess the starting point would be the geonomes 
database, except, if I understand correctly, geonames does not have the bounds 
of locations. Instead, it has only the centroids of locations.

A better way might be something like the following --

I am using Google Maps as my base layer anyway. Could I somehow submit a search 
through my application to the Google Maps base layer, return the bounds and 
zoom to that?

Thoughts? 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] Chart Layers

2011-10-13 Thread pcreso
Do you mean an S-57 layer?
 
If so, then technically, yes, you can via GDAL/OGR. Although I prefer to use 
OGR to extract the required layers into a Postgis database & use Postgis as the 
back end data management tool, as I can use dynamic SQL's for simplified zoom 
layers, etc..
 
See: 
http://osgeo-org.1803224.n2.nabble.com/Info-S-57-nautical-map-on-MapServer-td5329589.html
 
If you mean some other sort of chart, please be more explicit.
 
Cheers,
 
  Brent Wood

--- On Fri, 10/14/11, Eric Weisbender  wrote:


From: Eric Weisbender 
Subject: [mapserver-users] Chart Layers
To: mapserver-users@lists.osgeo.org
Date: Friday, October 14, 2011, 10:29 AM




Is it possible to label and query a chart layer.  If so how and is there 
documentation on this.
 
Thanks
EW
-Inline Attachment Follows-


___
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] Issue with run-time substitution?

2011-08-30 Thread pcreso
One question...

>From a performance perspective, I would have thought that having the fliter
 FILTER  (stype='B' and uc='%vucv%')
inside the DATA statement SQL would be faster, as only the relevant records 
would be returned to mapserver, & Postgres would be more efficient at doing 
this.

Is there any advantage in using FILTER instead of an SQL WHERE clause for this?

Brent Wood

--- On Tue, 8/30/11, Julien Cigar  wrote:

From: Julien Cigar 
Subject: Re: [mapserver-users] Issue with run-time substitution?
To: mapserver-users@lists.osgeo.org
Date: Tuesday, August 30, 2011, 11:49 PM

On 08/30/2011 13:43, Stephen Davies wrote:
> I am running mapserver 6.0.1 with map files migrated from 5.6.3.
>
> One of my map files has stopped working properly and I suspect that it may be 
> a
> bug in the 6.0.1 run-time substitution code.
>
> The relevant map file layer sections look like this:
>
>     LAYER
>        CONNECTIONTYPE postgis
>        NAME "battery"
>        DATA "geom from wmd  using unique id using SRID=4283"
>        CONNECTION "user=scldad dbname=benparts"
>        STATUS ON
>        TYPE POINT
>        VALIDATION
>          vucv '[0-9]*_[0-9]*'
>        END
>        FILTER  (stype='B' and uc='%vucv%')
>        PROJECTION
>          "init=epsg:4283"
>        END
>        MAXSCALE 500
>        LABELITEM "label"
>        CLASSITEM "state"
>        CLASS
>          EXPRESSION "G"
>          STYLE
>            COLOR        0 255 0
>            SYMBOL 'dot'
>            SIZE 7
>            OFFSET 17 0
>          END
>          LABEL
>            POSITION CR
>            TYPE TRUETYPE
>            FONT arial
>            SIZE 8
>            COLOR 0 255 0
>            OFFSET 20 0
>            FORCE TRUE
>            STYLE
>                  GEOMTRANSFORM 'labelpoly'
>                  COLOR   255 255 255
>            END
>          END
>        END
> .
> .
> END
>
> There are twelve layers with essentially the same definition apart from the
> STYPE values.
>
> The invoking URL has&vucv=137_11 but the postgresql log reveals that no
> substitution has occurred. The final pgsql command still has '%vucv%'.
>
> I suspect that having more than one FILTER with the same substitution breaks
> things as all other substitutions work fine.
>
> (I also tried putting the substitution in the DATA entry but with no better
> result.)

You should use a METADATA section, something like:

METADATA
   "vucv_validation_pattern" '[0-9]*_[0-9]*'
END

instead of VALIDATION

>
> Cheers,
> Stephen
>


-- 
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

-Inline Attachment Follows-

___
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 DEM color ramp map file

2011-07-20 Thread pcreso
Not mapserver specific, but there are several options at CPT city.

You'll need to code them into mapserver yourself. It is often easier to 
generate a georeferenced image (geotiff, PNG with world file, ...) with an 
appropriate palette with something like GMT & just use this with mapserver. 
Even have a CGI build the raster map on the fly for mapserver to access.

See: http://soliton.vm.bytemark.co.uk/pub/cpt-city/


HTH

Brent Wood

--- On Wed, 7/20/11, John Callahan  wrote:

From: John Callahan 
Subject: [mapserver-users] elevation DEM color ramp map file
To: mapserver-users@lists.osgeo.org
Date: Wednesday, July 20, 2011, 6:17 AM

I'm just curious but does anyone know of Mapserver .map files, or color map 
text files, with classes designed for a elevation DEM?  Or possibly a list of 
color ramps that work well for DEM maps? I read that GRASS had some predefined 
templates for applying color to DEMs and wondering if Mapserver has a similar 
thing, perhaps shared on a wiki or other site.  The DEM I'm working with now 
has low relief, from -5 meters to about 150 meters, however a general method or 
set of map files that can be applied to a range of DEMs could be helpful to 
many.  Does something like this exist?  Thanks.


- John


***
John Callahan, Research Scientist
Delaware Geological Survey
University of Delaware
URL: http://www.dgs.udel.edu
***




-Inline Attachment Follows-

___
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] substitution in a PostGIS layer .. ?

2011-07-13 Thread pcreso
Hi Julian,

That should work, if you look at the species maps at 
http://www.marinebiodiversity.org.nz
I do exactly that to substitute the selected species name into the SQL in the 
mapserver DATA statement to generate the WFS layer. 

In this case the client application appends &spp=x to the query string 
instead of doing it in the cgi, but I have done the same thing in cgi's as well.

Perhaps try it with a lower case variable name & see if that works?

Cheers,

  Brent Wood

--- On Thu, 7/14/11, Julien Cigar  wrote:

From: Julien Cigar 
Subject: [mapserver-users] substitution in a PostGIS layer .. ?
To: mapserver-users@lists.osgeo.org
Date: Thursday, July 14, 2011, 12:29 AM

Hello,

I have the following mapfile: http://www.pastie.org/2206896 with the following 
SLD: http://www.pastie.org/2206902 (generated dynamically)

I wondered how can I change the WHERE sp.id=%SPID% in the subselect (following 
a CGI parameter)?

I read http://mapserver.org/cgi/runsub.html, and tried with %SPID% (by passwing 
&SPID=3 in my URL) but it doesn't seems to work ... any idea?

Thanks,
Julien

-- No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

-Inline Attachment Follows-

___
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] RE: Random colours for polygon fill?

2011-07-06 Thread pcreso
Hi Robert,

I have resolved a similar issue with mapserver (where mapserver variable 
substitution couldn't supply the required functionality) by having a cgi script 
write the mapfile on the fly, using some logic to customise the mapfile as 
required. Then the script invokes mapserver with the mapfile.

Sort of:

write mapfile header down to common layer details 
for class in LIST ; do
  write class with random colour
done
close mapfile
invoke mapserver with new mapfile

The issue with this approach is that every invocation will have different 
colours (unless you always start with the same random seed & use a pseudorandom 
sequence).


Option 2 is similar. I believe mapserver's runtime variable substitution 
supports the CLASS expression. A cgi could generate the name/value pairs for 
the required random colours, append them to the URL query string, invoke 
mapserver & have mapserver carry out the variable substitution as it 
preprocesses the mapfile.


Another similar issue I resolved recently: A WMS polygon layer with various but 
fixed colours & a WFS layer with a point in each polygon with the metadata in 
OpenLayers.

A table stores the RGB values used in the WMS classes, a query generates a java 
#hex string from the RGB values, so the WFS layer provides the colour to render 
each point in, OpenLayers reads the colour for each feature from the WFS 
fields, so they match the WMS polygons.

The query in the data statement generates java #hex from rgb values, which is 
fine from postgis, I'm not sure if you can do this from a shapefile, but if so, 
you could  perhaps predefine your colours in the shapefile, with a value per 
feature:

geom from (select r.gid + (100 * p.id) as gid,
    r.gid as r_id,
    p.id as p_id,
    r.regioncode,
    r.regionname,
    p.geom,
 ('#'||case when (length(to_hex(r_fill))=1)
 then '0'||to_hex(r_fill)
 else to_hex(r_fill) end||
   case when (length(to_hex(g_fill))=1)
 then '0'||to_hex(g_fill)
 else to_hex(g_fill) end||
   case when (length(to_hex(b_fill))=1)
 then '0'||to_hex(b_fill)
   else to_hex(b_fill) end) as hex_fill,
 ('#'||case when (length(to_hex(r_pen))=1)
 then '0'||to_hex(r_pen)
 else to_hex(r_pen) end||
   case when (length(to_hex(g_pen))=1)
 then '0'||to_hex(g_pen)
 else to_hex(g_pen) end||
   case when (length(to_hex(b_pen))=1)
 then '0'||to_hex(b_pen)
   else to_hex(b_pen) end) as hex_pen
  ...


Cheers,

   Brent
 


Dear Mapserver users



Just wondering if it is possible to colour a polygon Shape file layer with each 
distinct polygon having a different colour?



Many thanks,



Robert Sanson 


   
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 

 

-Inline Attachment Follows-

___
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 pcreso
Cynthia  Brewer's site (http://colorbrewer2.org/) offers the option to select 
colour schemes to avoid problems with colour blindness. I don't know if they 
comply with US federal standards, but it would seem a good place to look.

--- On Sat, 6/25/11, Bob Basques  wrote:

From: Bob Basques 
Subject: Re: [mapserver-users] color standards in layers
To: "Paul Alarcon" , mapserver-users@lists.osgeo.org, 
pcr...@pcreso.com
Date: Saturday, June 25, 2011, 7:15 AM


  

  
  All,

  

  Another piece of the equation along these lines, is paying attention to 
color blindness types etc. There are some federal standards out there as a 
matter of fact related to the serving up of color content over the web related 
to color blindness.

  

  Something else to think about.

  

  bobb

  

  

  

  >>>  wrote:


  

  

  

  
Two places I'd suggest looking:

cpt city provides a wide range of palettes for mapping & other data that can be 
adapted to mapserver, including several standard palettes:
http://soliton.vm.bytemark.co.uk/pub/cpt-city/

and colorbrewer allows you to set up & preview various optimised palettes for 
maps:
http://colorbrewer2.org/ (also as Cynthia Brewer's palettes at the above site)

Cheers,

  Brent Wood

--- On Fri, 6/24/11, Paul Alarcon  wrote:
  
  

  

  From: Paul Alarcon 
Subject: [mapserver-users] color standards in layers
To: mapserver-users@lists.osgeo.org
Date: Friday, June 24, 2011, 10:27 AM



  
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.

Thanks a lot

Greetings

Paul A.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/color-standards-in-layers-tp6510229p6510229.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 pcreso
Two places I'd suggest looking:

cpt city provides a wide range of palettes for mapping & other data that can be 
adapted to mapserver, including several standard palettes:
http://soliton.vm.bytemark.co.uk/pub/cpt-city/

and colorbrewer allows you to set up & preview various optimised palettes for 
maps:
http://colorbrewer2.org/ (also as Cynthia Brewer's palettes at the above site)

Cheers,

  Brent Wood

--- On Fri, 6/24/11, Paul Alarcon  wrote:

From: Paul Alarcon 
Subject: [mapserver-users] color standards in layers
To: mapserver-users@lists.osgeo.org
Date: Friday, June 24, 2011, 10:27 AM

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.

Thanks a lot 

Greetings

Paul A.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/color-standards-in-layers-tp6510229p6510229.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] upgrade Mapserver 5.4 to 6.0 (gulp!)

2011-06-10 Thread pcreso
Just my opinion. But the koolest thing is we do have choices!!


ELGIS is nice, but I found it more limited in terms of supported packages (that 
I use anyway) & speed of update to new versionscompared to both OpenSuse & 
Ubuntu.

My computer use pretty much revolves around Open Source GIS stuff (& has done 
for over 10 years now). I've been a somewhat promiscuous Linux user, jumping to 
whichever made my life easiest for a click & go Linux GIS workstation.

For a few years, OpenSuse ruled my desktop, but for the last 18 months or so I 
have felt UbuntuGIS has the edge. There are still things I prefer about 
OpenSuse, some nice things about Fedora too, but for something that just 
installs and runs on desktops, notebooks & netbooks, & has a full, well 
maintained GIS repository, with everything I need (almost anyway - no hi res & 
full res GHSSH for GMT :-), for now I'm running Ubuntu.  

I'm not saying it's best for everyone, just passing on my experience.

See:

Ubuntu stable: https://launchpad.net/~ubuntugis/+archive/ppa
Ubuntu unstable: https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable
 (also note there are many related packages in other repositories)

OpenSUSE:GEO: 
http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.4/x86_64/

Cheers,

  Brent Wood

--- On Fri, 6/10/11, Smith, Michael ERDC-CRREL-NH 
 wrote:

From: Smith, Michael ERDC-CRREL-NH 
Subject: Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0  (gulp!)
To: "Chris Green" , pcr...@pcreso.com
Cc: mapserver-users@lists.osgeo.org
Date: Friday, June 10, 2011, 10:06 PM



Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0  (gulp!)
For Fedora, I think you want the EPEL and ELGIS repos.



See http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS



Mike





-- 

Michael Smith

Remote Sensing/GIS Center

US Army Corps of Engineers







On 6/10/11 3:34 AM, "Chris Green"  wrote:



Hi Brent

 

Thank you for your very helpful comments, much appreciated. It is pretty clear 
to me that I have to start by changing my elderly Fedora to something better 
suited to supporting GIS applications including Mapserver 6.0. It is strange – 
I’m not at all afraid of PHP/Mapscript (although the documentation is not 
great) or of Javascript, but the whole Linux world is just so confusing that I 
get a form of paralysis by analysis soon after I start trying to compare the 
different options. 

 

Anyway I will certainly take a look at Ubuntu / OpenSuse.

 

 

Chris

 



From: pcr...@pcreso.com [mailto:pcr...@pcreso.com] 

Sent: 10 June 2011 07:21

To: chris.gr...@ibstv.co.uk

Cc: mapserver-users@lists.osgeo.org

Subject: Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0 (gulp!)

 

Hi Chris, 



I'm a Suse/Ubuntu user, in both cases totally because of the well supported GIS 
related packages for these distros. So I have completely avoided the issues are 
facing right now :-) Though I'd imagine it will not be long before 6.0 is 
available natively for Fedora, given 5.6 is supported.



I'm not too familiar with the RH Linux family, but the OpenSuse Geo repository 
partially supports Centos & RH4/5, and I have found the maintainers there to be 
very helpful. If a RH or Centos build will be compatible with Fedora, it would 
be worth asking around there. Mapserver is not currently built for these 
distros, but someone may be prepared to do this for you.



http://download.opensuse.org/repositories/Application:/Geo/



Personally, I'd suggest you switch to a distro that does what you want, & if 
that includes well maintained & supported, pre-built mapserver (& related) 
packages, Ubuntu & OpenSuse are well worth considering.



HTH,



  Brent Wood







--- On Fri, 6/10/11, Smith, Michael D ERDC-CRREL-NH 
 wrote:

From: Smith, Michael D ERDC-CRREL-NH 

Subject: Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0 (gulp!)

To: "Chris Green" , "'Stephen Woodbridge'" 
, mapserver-users@lists.osgeo.org

Date: Friday, June 10, 2011, 3:31 AMChris,



What Linux OS are you on? There are packages for Ubuntu, Debian, RHEL, etc.



See http://mapserver.org/download.html#linux





On 6/9/11  11:04 AM, "Chris Green"  > wrote:



> Hi Steve

> 

> Thanks for your comments. I have read the documentation and realise that

> there will be quite a few changes to my mapfile(s). I'm not at all worried

> about that, it's just a question of patiently working through the changes.

> However I am very apprehensive of the upgrade itself. Before I installed the

> FGS package I spent many, many hours trying to compile and install Mapserver

> myself but eventually had to admit defeat and resort to FGS.

> 

> Now there is no FGS to fall back on, I'm hoping for some guidance (or maybe

> just some encouragement!)

> 

> 

> Chris

> 

> -Original Message-

> From: mapserver-users-boun...@lists.osgeo.org 
>  

> [mailto:mapserver-users-boun...@lists.osgeo.org 
>  ] On Behalf Of 
> Stephen

> Woodbridge

> Sent: 09 June 2011 15:42

> To: mapserver-users@lists.os

Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0 (gulp!)

2011-06-09 Thread pcreso
Hi Chris, 

I'm a Suse/Ubuntu user, in both cases totally because of the well supported GIS 
related packages for these distros. So I have completely avoided the issues are 
facing right now :-) Though I'd imagine it will not be long before 6.0 is 
available natively for Fedora, given 5.6 is supported.

I'm not too familiar with the RH Linux family, but the OpenSuse Geo repository 
partially supports Centos & RH4/5, and I have found the maintainers there to be 
very helpful. If a RH or Centos build will be compatible with Fedora, it would 
be worth asking around there. Mapserver is not currently built for these 
distros, but someone may be prepared to do this for you.

http://download.opensuse.org/repositories/Application:/Geo/

Personally, I'd suggest you switch to a distro that does what you want, & if 
that includes well maintained & supported, pre-built mapserver (& related) 
packages, Ubuntu & OpenSuse are well worth considering.

HTH,

  Brent Wood



--- On Fri, 6/10/11, Smith, Michael D ERDC-CRREL-NH 
 wrote:

From: Smith, Michael D ERDC-CRREL-NH 
Subject: Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0  (gulp!)
To: "Chris Green" , "'Stephen Woodbridge'" 
, mapserver-users@lists.osgeo.org
Date: Friday, June 10, 2011, 3:31 AM

Chris,

What Linux OS are you on? There are packages for Ubuntu, Debian, RHEL, etc.

See http://mapserver.org/download.html#linux


On 6/9/11  11:04 AM, "Chris Green"  wrote:

> Hi Steve
> 
> Thanks for your comments. I have read the documentation and realise that
> there will be quite a few changes to my mapfile(s). I'm not at all worried
> about that, it's just a question of patiently working through the changes.
> However I am very apprehensive of the upgrade itself. Before I installed the
> FGS package I spent many, many hours trying to compile and install Mapserver
> myself but eventually had to admit defeat and resort to FGS.
> 
> Now there is no FGS to fall back on, I'm hoping for some guidance (or maybe
> just some encouragement!)
> 
> 
> Chris
> 
> -Original Message-
> From: mapserver-users-boun...@lists.osgeo.org
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen
> Woodbridge
> Sent: 09 June 2011 15:42
> To: mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] upgrade Mapserver 5.4 to 6.0 (gulp!)
> 
> On 6/9/2011 8:58 AM, Chris Green wrote:
>> Hi All
>> 
>> I have been running Mapserver 5.4 for about 18 months on a Fedora core 7
>> Unix platform. I installed it via the FGS installer package which made
>> the installation process relatively straightforward.
>> 
>> Now I see that Mapserver 6.0 has been released and it includes some
>> features that I really want to take advantage of, particularly the
>> ability to cluster dense features. My problem is that apparently the FGS
>> package has not been updated, so from the Mapserver website it looks
>> like I have start from scratch with a scarily long list of libraries and
>> compilations required to install Mapserver 6.0 from scratch. As
>> something of a Unix novice I don't fancy this very much!
>> 
>> I am wondering if there is a simple way to in effect replace my existing
>> Mapserver 5.4 executable with Mapserver 6.0 - could I assume that
>> Mapserver 6.0 only requires the same libraries as 5.4 and just compile
>> the 6.0 executable? Any guidance on the direction to take here would be
>> gratefully received.
> 
> Hi Chris,
> 
> Be aware that 5.4 to 6.0 is probably NOT a transparent upgrade from a
> mapfile point of view. Make sure you read the mapserver migration guide.
> One of the big changes that we made in 6.0 was to clean up some of the
> mapfile syntax and remove some deprecated tags. These should not be
> major changes but it is likely that some (all?) of your mapfiles will
> need to be tweaked to get them to work.
> 
> So please plan accordingly.
> 
> -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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Help needed with empty WFS layer

2011-05-23 Thread pcreso
Hi,

I figure I've missed something obvious in the mapfile, but I can't see it... 
can anyone else see why WMS works for this layer but WFS doesn't? 
GetCapabilities works fine for both WMS & WFS.

I have a mapfile, (MS v5.6.6.) with a layer set up as both WMS & WFS, 
accessible from:
http://boi.wms.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-36.855397,174.740902,-36.813416,174.798964&CRS=EPSG:4326&WIDTH=485&HEIGHT=351&LAYERS=Surveillance_native&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE

(for context you can include the coastpoly layer as well)

As a WMS, it works fine, all points rendered as expected, eg, the URL above in 
a browser. As a WFS, it returns an empty dataset. The XML from the WFS 
connection:
 
http://boi.wms.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=Surveillance_native


p, li { white-space: pre-wrap; }


is:

missing




The embedded SQL works fine from psql, & it works via WMS.
I have "GML_include_items" & "DUMP true" in the layer definition in the 
mapfile, which is below.

  LAYER
    NAME "Surveillance_native"
    TYPE point
    STATUS on
    DUMP true

    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname=xxx user=xxx host=localhost port=5432"

    DATA "geom from (SELECT t.stid as gid,
    n.taxon_name as name,
    s.geom_point as geom
 FROM surveillance.samples s, 
  public.taxon_names n,
  surveillance.s_taxa t
 WHERE s.site_id = t.site_id
   and t.key=n.key
   and n.biosecurity_status = 'Native'
 ) as myquery using unique gid using srid=4326"

    METADATA
  "wms_title" "Surveillance_native"
  "wms_srs"   "EPSG:4326"
  "wfs_title" "Surveillance_native"    
  "wfs_srs"   "EPSG:4326"
  "wfs_version" "1.0.0"
  "wfs_typename" "Surveillance_native"
  "gml_include_items" "all"
  "wfs_extent" "177 -48 179 -34"
    END

    CLASS
  NAME "Surv_native"
  STYLE
    SYMBOL "circle"
    SIZE 5
    COLOR 255 0 0
    ANTIALIAS true
  END
    END

    PROJECTION
  "init=epsg:4326"
    END

  END # layer


Any advice appreciated...

  Thanks,

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


Re: [mapserver-users] Rasters and WFS

2011-05-19 Thread pcreso

WMS supports a GetFeature capability, to retrieve info from the server about 
the location clicked on the map, queried against a specified layer, which might 
work if you are determined not to have a WMS background & WFS overlay.

Note that if you open the WMS & WFS layers in QGIS, & save the project 
(session), you can just reopen the project to re-make both connections as a 
single operation.

HTH

Brent Wood


--- On Fri, 5/20/11, SixDegrees  wrote:

From: SixDegrees 
Subject: [mapserver-users] Rasters and WFS
To: mapserver-users@lists.osgeo.org
Date: Friday, May 20, 2011, 7:36 AM

I am very new to GIS software. We are developing an application that will use
both QGis and/or a web browser as the front end. Basically, we have large
image files we will be sending as a background layer, and we want to overlay
them with points having various attributes. The user should be able to click
on each of the points and read off that point's attributes.

This works well if we load our background image through a WMS layer and load
the points via a shapefile as a vector layer in QGis; points are displayed
atop the image and are clickable, bringing up a table of attributes for the
selected point.

In QGis, at least, adding the shapefile to the WMS mapfile does not permit
clicking on points in the UI. It is not possible for the user to obtain
shapefiles locally, so we need a solution that will allow both sets of
information to be sent through a web service.

Will WFS allow raster images to be embedded? Documentation seems to indicate
not, but isn't quite clear.

We can insist that the user open both a WMS and WFS layer, but this gets
messy; we would really prefer a single data stream solution.

A browser-based solution seems feasible with WMS, based on the quick trip
I've taken through MapServer tutorials. Our customers, however, are
comfortable with QGis and strongly prefer that option as an interface.

Any thoughts would be appreciated.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Rasters-and-WFS-tp6383431p6383431.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] Parameterized MapFile using CGI variable

2011-04-29 Thread pcreso
Yes.

Just as you have suggested. Have a CGI wrapper script, which determines the 
variable's value based on hostname (or whatever), then append this (to the 
QUERY_STRING prior to executing mapserver.

See: http://mapserver.org/cgi/wrapper.html

As shown in the link below, both the CONNECTION & DATA strings in the mapfile 
are supported by the preprocessor for variable substitution.

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


Cheers,

Brent Wood



--- On Sat, 4/30/11, Nicolas BOUTET  wrote:

From: Nicolas BOUTET 
Subject: [mapserver-users] Parameterized MapFile using CGI variable
To: mapserver-users@lists.osgeo.org
Date: Saturday, April 30, 2011, 1:56 AM

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  
-Inline Attachment Follows-

___
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] Efficiency - Postgres/gis view or Mapserver data definition join

2011-04-29 Thread pcreso
Hi Dana, 

Usually it does not matter much, as mapserver passes the query to Postgis 
anyway, as you noted. However, mapserever does do some parsing & rewriting of 
the query before issuing it, and this can cause issues.

Also note that when working in the db, it is easier to use explain, check 
indexes, etc to optimise your query, so if it is anything but a simple join, 
I'd suggest creating it in the database is the tidier way to do this.

I guess I approach it with the premise that mapserver is the rendering engine, 
Postgis is the data management/query engine. If your dba is going to be able to 
see the views/queries/joins which the db implements, & manage/optimise the db 
for these, it is much easier if they are inplemented in the db than scattered 
around in mapfiles.

This said, I use where clauses all the time in mapfiles, for layers based on 
data driven categories within a single table, for example, map LAYER DTIS = 
"select ... where category='DTIS';", etc. I'd suggest views in this case are 
just clutter :-)

It is a case-by-case basis... for informed advice, seeing the actual query 
would be useful
.
Cheers,

 Brent Wood

--- On Fri, 4/29/11, Dara Olson  wrote:

From: Dara Olson 
Subject: [mapserver-users] Efficiency - Postgres/gis view or Mapserver data 
definition join
To: mapserver-users@lists.osgeo.org
Date: Friday, April 29, 2011, 6:34 AM



 
 


Greetings.  I am hoping that I have posted 
this on the most appropriate list, please let me know if I should be 
posting to a different list. 
 
In our Mapserver application, we join a lot of tables 
together - generally one table with geometry to a "flat" table with 
tabular data.  My question is - is it more efficient/faster to create 
a view in PostgreSQL doing the join and link to the view table from 
Mapserver or to define the join (SQL statement) with Mapserver in 
the data definition within the layer definition? Does it even matter 
because Mapserver sends the request to PostgreSQL/GIS? 
 
Also, we have joins that take a field within the flat 
table to determine which table to join to get geometry.  For example, 
if the flat table column "join" value is equal to 1 then it joins to 
"table1" to get geometry or if column "join" value is equal to 2 then it joins 
to "table2" to get geometry. I read something that you were not supposed to use 
WHERE clauses in the Mapserver data definition.  Would this be better to do 
as a view and link to the view table from the data definition?
 
Any advice would be greatly appreciated.  Thanks 
in advance!
Dara
-Inline Attachment Follows-

___
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] Mapserver metadata

2011-04-19 Thread pcreso
Hi,

The mapserver docs describe map & layer level metadata. eg:

Map object: 





















wms_abstract
WMS TAG Name: Abstract
(WMS1.1.1, sect. 7.1.4.2) 

Description: (Optional) A blurb of text providing
more information about the WMS server. 



Layer object:
wms_abstract
Same
as wms_abstract in the Web Object.


What is not clear to me is whether a layer will automatically and explicitly 
inherit the map object content if there is no layer level item present, and 
whether the layer level content will supercede the map level content if present.

Thus, if I set a map object attribution content, or keywords, will these 
explicitly apply to every layer described in a capabilities document, or is it 
up to the client application to apply map level content to the layer objects.


Thanks,

  Brent Wood



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


Re: [mapserver-users] WMS help with dataline issues

2011-03-21 Thread pcreso
A few possible approaches... for both vector & raster data



Try this at the clent side:



http://openlayers.org/dev/examples/wrapDateLine.html



I have also (in PostGIS) replicated vector data in the western hemisphere so 
the global dataset extends from -180 to 360.



Also, depending on whether or not you have polygons/linestrings crossing
 180, I've used the Postgis shift_longitude() function to resolve this 
serverside.



Also, take your +-180 raster map, with a tool like imagemagick, chop it 
in half at 180, & create an eastern hemisphere with an extent of 
0-180, and two western hemispheres, one with an extent from -180-0 &
 one from 180-360. In your map file set all three to status default so 
they are always on, or make them members of the same group so they can 
be de/selected as a single layer.



There are a few hacks around this, but not many definitive answers.

--- On Tue, 3/22/11, Tim Erwin  wrote:

From: Tim Erwin 
Subject: [mapserver-users] WMS help with dataline issues
To: mapserver-users@lists.osgeo.org
Date: Tuesday, March 22, 2011, 2:37 PM

I am using raster data from naturalearthdata which is in EPSG:4326 [-180 -90 
180 90]. But when requesting data via openlayers with the map centred at 180E 
it only draws up to 180E. Below is one of the requests from openlayers: 


http://localhost/mapserv.cgi?map=naturalearth.map&LAYERS=NE1&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=165,-30,215,20&WIDTH=256&HEIGHT=256


How do I get mapserver to render past 180E (or other options)? 

Regards,

Tim

##MAPFILE

MAP
    NAME "NaturalEarth"
    IMAGETYPE  PNG24
    SIZE   800 600

    SHAPEPATH  "./data"
    EXTENT -180 -90 180 90
    DEBUG 3

    WEB
    METADATA
    "wms_title"  "NaturalEarth WMS"
    "wms_srs"   "EPSG:4326"

    END
    END

    PROJECTION
   "init=epsg:4326"
    END

    #
    # Start of layer definitions
    #
    LAYER
    NAME "NE1"
    DATA "NE1_HR_LC_SR_W_DR.tif"

    TYPE RASTER
    STATUS ON

    PROJECTION
   "init=epsg:4326"
    END

    END

END #mapfile


-Inline Attachment Follows-

___
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] Heatmap / choropleth from points attributes

2011-02-23 Thread pcreso
Hi Daniel,

Points to voronoi for mapping is surely a chloropleth more than a heatmap? 
Colouring polygons by value? A heat map is generally done by rendering a 
surface generated from point data.

>From the original question I'm not sure if simply plotting coloured points on 
>the map is required, or some sort of aggregation of the point data by polygon.

I _think_ the intent is to take sets of points, each within a polygon (field), 
generate a surface within each polygon based on the point values, then render 
each surface to form a heatmap (the rendered map thus comprising a set of 
polygons, each of which is represented by its own heat map) ???


For a more elegant GIS based approach, I'd use GMT to render a static map for a 
web page, which was the intent behind original question. Mapserver is more for 
dynamic/interactive web mapping.

See: http://gmt.soest.hawaii.edu/gmt/doc/gmt/pdf/GMT_Docs.pdf

For different ways of showing the values of points on a map see the examples on 
pages 120, 121, 138, 141, 144, etc. And there are many others with a tool this 
powerful (& complex) including generating & plotting surfaces derived from 
point data (for heat maps)

You write a script to build the map, much as in the p141 example, which shows 
how GMT can create a complex legend automatically as well, and run the script 
whenever a new or updated map is required.

The GMT list (IMHO) is a helpful & supportive as any mailing list I've 
encountered, even this one!!

A script which iterates through each field (set of points) generating each 
constrained surface and inserting it to a grid, then rendering the entire grid 
for your map output would do this pretty easily.

See the GMT docs for the commands surface for one way to generate each field of 
points as a grid, grdmath for how to merge these into one grid, & grdimage for 
how to generate the map from these gridded data. Or you could just render each 
field separately with grid points outside the field polygon set to NAN & 
rendered transparent.

Or throw all the points into a surface, render this as a single heat map & 
overlay the fields as transparent polygons (optionally labelled) with perhaps 
the regions between polygons masked if appropriate?

Lots of ways of generating such maps :-)

If you'd like some help going down this path, contact me off list.

Cheers,

  Brent Wood




--- On Thu, 2/24/11, Puneet Kishor  wrote:

From: Puneet Kishor 
Subject: Re: [mapserver-users] Heatmap / choropleth from points attributes
To: "Milo van der Linden" 
Cc: mapserver-users@lists.osgeo.org
Date: Thursday, February 24, 2011, 6:23 AM

On Wed, Feb 23, 2011 at 04:28:31PM +0100, Milo van der Linden wrote:
> Turning points into polygons (or voronois) is the "thinking like a GIS
> professional" approach. This is valid, but not as good as it can get.
> Basically, using imaging techniques would be a better approach.

Very well put.

> 
> Perhaps you can take this: http://www.sethoscope.net/heatmap/ as a starting
> point? The author has created a nice python script to generate a heatmap.

And here is a Perl-based approach
[http://blog.imtrevor.com/2009/07/16/generating-heat-maps-using-perl/]


> 
> 2011/2/23 Josh Jordan 
> 
> > First, you have to turn your points into shapes, theres some algorithm that
> > will turn points into polygons with borders midway between each point.
> >  Then, you have to add classes to the mapfile.  Add one class per color.
> >  You have to calculate the bounds and color for each class like this:
> >
> > CLASS
> >     EXPRESSION(([POPULATION] gt 90457) AND ([POPULATION] le 108397))
> >     STYLE
> >       COLOR 10 20 50
> >     END
> > END
> >
> > If your CSV data isnt joined to the mapserver data, you have to calculate
> > what shapes are in each bucket like this-
> >
> > CLASS
> >     EXPRESSION(([NAME] = "Shape1") OR ([NAME] = "Shape2"))
> >     STYLE
> >       COLOR 10 20 50
> >     END
> > END
> >
> > --- On *Tue, 2/22/11, Daniel Cole * wrote:
> >
> >
> > From: Daniel Cole 
> > Subject: [mapserver-users] Heatmap / choropleth from points attributes
> > To: mapserver-users@lists.osgeo.org
> > Date: Tuesday, February 22, 2011, 10:06 PM
> >
> > I am a new mapserver user and have spent countless hours over the last
> > month reading, trying code, etc. before posting here for help.  I am trying
> > to generate an image (non-interactive) on a webpage based off of attribute
> > data in a points file.  For example, 20 different points equally distributed
> > in a field contain data about the moister level of the soil.  I want to make
> > the lowest levels blue and the highest levels yellow, or something like that
> > with some gradients in between.  If possible I want it to have interpolated
> > data between them to show the gradual change, but that isn't a must.   I
> > also want to wrap it in a polygon that trims the edges.
> >
> > I found some python code that I thought might do the trick , but it seems
> > lots of heat maps are based off of how ma

Re: [mapserver-users] OGR VRT ODBC connection problem

2011-02-20 Thread pcreso
Thanks Stephen, 

I should have included this in my first msg, apologies, but thanks for the 
reply.

I'm running GDAL v1.6.1, from
ogrinfo --version
GDAL 1.6.1, released 2009/05/11
 

And, running isql (from unixodbc) also works.

isql --help
unixODBC 2.2.12

isql -v metp niwatest niwatest
libnuma: Warning: /sys not mounted or no numa system. Assuming one node: No 
such file or directory
+---+
| Connected!    |
|   |
| sql-statement |
| help [tablename]  |
| quit  |
|   |
+---+
SQL> select count(*) from land_station;
+-+
| COUNT(*)    |
+-+
| 8338    |
+-+    


So isql succeeds, and is definately using ODBC.

ogrinfo just hangs. Both have the /sys warning msg, which I am ignoring.


I'm still lost with respect to this


Thanks,

   Brent



--- On Mon, 2/21/11, Stephen Woodbridge  wrote:

From: Stephen Woodbridge 
Subject: Re: [mapserver-users] OGR VRT ODBC connection problem
To: pcr...@pcreso.com
Cc: mapserver-users@lists.osgeo.org, gdal-...@lists.osgeo.org
Date: Monday, February 21, 2011, 2:12 PM

Hi Brent,

I'm certainly not an expert on this, but I think the issue might be that 
sqlplus does not use an ODBC connection it uses some proprietary Oracle 
socket protocol to connect.

Do you have ODBC services setup, configured and running on the Linux 
host? How have you verified this?

If not then this is likely the issue. Sorry I don't use ODBC, so I can't 
help much more then this.

-Steve W

On 2/20/2011 7:12 PM, pcr...@pcreso.com wrote:
>
> Hi,
>
> Apologies for the cross posting, but I figure there are experts on both
> lists.
>
> I'm trying to get a ogr virtual connection working from a Linux host to
> a remote Oracle DB to use mapserver for a WFS service providing the
> required data..
>
> ODBC is working, eg:
>
> sqlplus user/user@metp 
> select count(*) from land_station;
> 8338
>
> etc...
>
> However, when testing with ogr2ogr, I get:
>
> ogrinfo ODBC:user/user@metp land_station
>
> libnuma: Warning: /sys not mounted or no numa system. Assuming one node:
> No such file or directory
>
> and the terminal window hangs, I'm unable to get any response, & have to
> kill the connection to continue.
>
>
> Any suggestions?
>
>
> Thanks,
>
> Brent Wood
>
>
>
>
>
>
> ___
> 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] OGR VRT ODBC connection problem

2011-02-20 Thread pcreso

Hi,

Apologies for the cross posting, but I figure there are experts on both lists.

I'm trying to get a ogr virtual connection working from a Linux host to a 
remote Oracle DB to use mapserver for a WFS service providing the required 
data..

ODBC is working, eg:

sqlplus user/user@metp
select count(*) from land_station;
8338

etc...

However, when testing with ogr2ogr, I get:

ogrinfo ODBC:user/user@metp land_station

libnuma: Warning: /sys not mounted or no numa system. Assuming one node: No 
such file or directory

and the terminal window hangs, I'm unable to get any response, & have to kill 
the connection to continue.


Any suggestions?


Thanks,

  Brent Wood




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


RE: [mapserver-users] Need to replace Google Maps API on webservice - Help!

2011-02-15 Thread pcreso
If you are displaying purchased data, it is most unlikely the licence for these 
will let you legally display these via Google Earth.

The Google Terms of Service state:

11.1 "... By submitting, posting or displaying the content you 
give Google a perpetual, irrevocable, worldwide, royalty-free, and 
non-exclusive license to reproduce, adapt, modify, translate, publish, 
publicly perform, publicly display and distribute any Content which you 
submit, post or display on or through, the Services."

11.4 "You confirm and warrant to Google that you have all the rights, power and 
authority necessary to grant the above license."

OpenLayers does not have such issues.


Brent Wood



--- On Wed, 2/16/11, Ivan Cardenas  wrote:

From: Ivan Cardenas 
Subject: RE: [mapserver-users] Need to replace Google Maps API on webservice - 
Help!
To: "christopher.schm...@nokia.com" 
Cc: "mapserver-users@lists.osgeo.org" 
Date: Wednesday, February 16, 2011, 3:33 PM

#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_mark {} _filtered #yiv1523442464 {}#yiv1523442464 
SPAN.yiv1523442464skype_pnh_container {LIST-STYLE:disc none 
outside;BORDER-BOTTOM:#00 0px;TEXT-ALIGN:left;BORDER-LEFT:#00 
0px;PADDING-BOTTOM:0px !important;LINE-HEIGHT:14px 
!important;TEXT-TRANSFORM:none;FONT-STYLE:normal;TEXT-INDENT:0px 
!important;MARGIN:0px;PADDING-LEFT:0px !important;WIDTH:auto 
!important;PADDING-RIGHT:0px 
!important;DISPLAY:inline;BORDER-COLLAPSE:separate;FONT-FAMILY:Tahoma, Arial, 
Helvetica, sans-serif 
!important;DIRECTION:ltr;WHITE-SPACE:nowrap;BACKGROUND:no-repeat 0px 
0px;FLOAT:none;TABLE-LAYOUT:auto;LETTER-SPACING:0px !important;HEIGHT:14px 
!important;COLOR:#49535a;CLEAR:none;FONT-SIZE:11px 
!important;VERTICAL-ALIGN:baseline 
!important;OVERFLOW:hidden;BORDER-TOP:#00 
0px;CURSOR:pointer;FONT-WEIGHT:bold;BORDER-RIGHT:#00 0px;WORD-SPACING:normal
 !important;TEXT-DECORATION:none;PADDING-TOP:0px !important;}#yiv1523442464 
SPAN.yiv1523442464skype_pnh_container * {LIST-STYLE:disc none 
outside;BORDER-BOTTOM:#00 0px;TEXT-ALIGN:left;BORDER-LEFT:#00 
0px;PADDING-BOTTOM:0px !important;LINE-HEIGHT:14px 
!important;TEXT-TRANSFORM:none;FONT-STYLE:normal;TEXT-INDENT:0px 
!important;MARGIN:0px;PADDING-LEFT:0px !important;WIDTH:auto 
!important;PADDING-RIGHT:0px 
!important;DISPLAY:inline;BORDER-COLLAPSE:separate;FONT-FAMILY:Tahoma, Arial, 
Helvetica, sans-serif 
!important;DIRECTION:ltr;WHITE-SPACE:nowrap;BACKGROUND:no-repeat 0px 
0px;FLOAT:none;TABLE-LAYOUT:auto;LETTER-SPACING:0px !important;HEIGHT:14px 
!important;COLOR:#49535a;CLEAR:none;FONT-SIZE:11px 
!important;VERTICAL-ALIGN:baseline 
!important;OVERFLOW:hidden;BORDER-TOP:#00 
0px;CURSOR:pointer;FONT-WEIGHT:bold;BORDER-RIGHT:#00 
0px;WORD-SPACING:normal !important;TEXT-DECORATION:none;PADDING-TOP:0px 
!important;}#yiv1523442464
 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_active_fax 
SPAN.yiv1523442464skype_pnh_right_span {BACKGROUND-POSITION:-92px 
0px;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_inactive_fax 
SPAN.yiv1523442464skype_pnh_right_span {BACKGROUND-POSITION:-92px 
0px;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_inactive_free 
SPAN.yiv1523442464skype_pnh_dropart_flag_span {BACKGROUND-POSITION:0px 
1px;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_inactive_free 
SPAN.yiv1523442464skype_pnh_textarea_span {BACKGROUND-POSITION:-90px 
0px;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_inactive_free 
SPAN.yiv1523442464skype_pnh_text_span {VISIBILITY:hidden;}#yiv1523442464 
SPAN.yiv1523442464skype_pnh_container
 SPAN.yiv1523442464skype_pnh_highlighting_active_free 
SPAN.yiv1523442464skype_pnh_dropart_flag_span {BACKGROUND-POSITION:0px 
1px;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_active_free 
SPAN.yiv1523442464skype_pnh_textarea_span {BACKGROUND-POSITION:-160px 
0px;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_highlighting_active_free 
SPAN.yiv1523442464skype_pnh_text_span {BACKGROUND-POSITION:-160px 
0px;COLOR:#ff;}#yiv1523442464 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_left_span {WIDTH:6px 
!important;BACKGROUND-POSITION:0px 0px;}#yiv1523442464 
SPAN.yiv1523442464skype_pnh_container SPAN.yiv1523442464skype_pnh_dropart_span 
{WIDTH:27px !important;BACKGROUND-POSITION:-11px 0px;}#yiv1523442464 
SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_dropart_wo_arrow_span {WIDTH:18px 
!important;BACKGROUND-POSITION:-130px 0px;}#yiv1523442464
 SPAN.yiv1523442464skype_pnh_container 
SPAN.yiv1523442464skype_pnh_dropart_flag_span {WIDTH:18px 
!important;BACKGROUND-POSITION:1px 1px;}#yiv1523442464 
SPAN.yiv1523442464skype_pnh_container SPAN.yiv1523442464skype_p

[mapserver-users] Help with runtime variable substitution in inline ODBC virtual data sources

2011-02-15 Thread pcreso
Hi,

I'm looking to set up a mapfile with an inline ovf data source as described in 
part 2 of section 5 at http://mapserver.org/input/vector/VirtualSpatialData.html

I'm also looking to embed an SQL in the ovf with a where clause, using runtime 
variable substitution as described at 
http://mapserver.org/cgi/runsub.html?highlight=variable

The latter says that such runtime substitution is supported in the CONNECTION & 
DATA fields within the LAYER object.

I'm unclear as to how a where clause can be inserted in the ovf definition, and 
am hoping that this will be in the CONNECTION or DATA fields, and is amenable 
to runtime variable substitution.

Basically with the URL including: 
&job_id=23
have an ovf where clause specified like:  ...    where 
job=%job_id%

 thus from this

have an ovf ODBC connection pass a where clause like:   and job_id=23 ..."  

This is connecting to an aspatial Oracle database returning up to 100 point 
features from a table with X Y columns..

Can anyone provide some hints on:

1. Is this possible?
2. How best to implement it?


Thanks,

   Brent Wood


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


[mapserver-users] WFS element datatypes are all strings - how to set as integer?

2010-11-22 Thread pcreso
Hi,

I'm looking to use mapserver to provide WFS data layers to QGIS clients. I need 
to display the layer using a data field to control symbology (symbol size), but 
QGIS can only use an integer field for this.

As below, mapserver identifies all the elements as strings, which is a problem. 
The data source is a Postgis table, the data statement generates an integer 
field to use to scale the layer, but mapserver seems to cast it as a string.

Is there any way to have mapserver specify a WFS integer element from a Postgis 
layer? 


Thanks,

  Brent Wood


http://boi.wms.niwa.co.nz/cgi-bin/cc_scaled_spp?SERVICE=WFS&VERSION=1.0.0&REQUEST=DESCRIBEFEATURETYPE&TYPENAME=Scaled_species

−
http://mapserver.gis.umn.edu/mapserver"; 
elementFormDefault="qualified" version="0.1">
http://www.opengis.net/gml"; 
schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>

−
    
−
   
 
−
    
−
    

























--- On Sat, 10/16/10, thomas bonfort  wrote:

From: thomas bonfort 
Subject: [mapserver-users] FW: announcing mod_geocache: an apache tiling module
To: "MapserverList OSGEO" 
Date: Saturday, October 16, 2010, 5:35 AM

Hi mapserver users,
(reposting here as I messed up the mapserver-users email address, you
should imagine I should know it has changed by now :) - please respond
to til...@lists.osgeo.org so as not to pollute this list)

Having followed the tiling sessions at
Barcelona, it seemed to me like a good idea to explore having a tiling
backend directly as an apache module (i.e directly implemented in C).
I have a preliminary implementation hosted at
http://code.google.com/p/mod-geocache/, that currently supports WMS
requests (as a client and server), metatiling and dynamic tile
merging. The architecture is very much inspired by the tilecache code.

the aims of the project are:
 * keep performance in mind at all times
 * simplify server deployment, not having to install and configure
python/mod_python/...
 * support wms backends, and offer frontends for wms, wmts and tms
 * enable (by configuration) the proxying or rescaling of requests
that cannot be directly served from cache
 * various image optimisations (watermarking, quantization, ...)

a preliminary benchmark againt tilecache can be found here:
http://code.google.com/p/mod-geocache/wiki/PreliminaryBenchmark

I would be happy to discuss on the subject with any folks or
organisations willing to contribute or ready to fund ongoing
development.

Best regards,

Thomas Bonfort
Terriscope EURL, Toulouse, France
___
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] Commercial support

2010-09-03 Thread pcreso
There are several I know of in New Zealand & others internationally. Where are 
you after such support?

I have often found that companies are more in need of a support contract for 
legal/liability issues than capability ones. FOSS tends to be on a user beware 
basis, & rather than take on the responsibility for running & maintaining 
software systems companies want someone else to be responsible.

It brings to mind one contract we lost by offering a FOSS based solution. The 
response came back that the client did not want an Open Source solution. What 
they got was a contract with a colleague based on the same Open Source apps we 
had proposed, with a support contract & no mention that the underlying tools 
were in fact Open Source. 

Brent Wood

--- On Fri, 9/3/10, Sebastian E. Ovide  wrote:

From: Sebastian E. Ovide 
Subject: [mapserver-users] Commercial support
To: mapserver-users@lists.osgeo.org
Date: Friday, September 3, 2010, 8:51 PM

Hi Guys,

Some companies choose commercial software such as Oracle MapViewer because they 
offer the security of commercial support. So if the companies have any problem 
configuring it (or any other problem) they will use the support that they have 
paid for. 



IT engineers in general can learn for them self and with the help of the 
community support (mailing list) they are able to solve virtually any problem. 
And MapServer mailing list is the perfect example of that. 



Nevertheless, CEOs and boards of directors still need some kind of security and 
they prefer to use software that provide commercial support.

Are you guys aware of companies that provide commercial support for MapServer ?



thanks,



-- 
Sebastian E. Ovide





-Inline Attachment Follows-

___
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: Migration to MapServer

2010-06-12 Thread pcreso
Essentially yes.


However, note that such an application may be retrieving data &/or code from a 
server via the LAN or internet, and may provide maps to either or both LAN or 
net clients. Not just data.

eg: your site may have a local copy of the OpenLayers code, or download on the 
fly from the OL website. Data may be from any local or remote server.

You can download data from places like OSM & store/use as local datasets, 
download on the fly, or download on the fly & cache locally.

You can use mapserver or other OGC compliant map serving applications such as 
Geoserver, Deegree, MapGuideOS, etc. Personally I prefer mapserver :-)

You can use OpenLayers natively or with wrappers providing additional 
functionality, such as 

MapFish   http://mapfish.org/  
Geomoose  http://geomoose.org/ 

to build your client, or use a framework which provides some such support built 
in such as 

Drupal   http://drupal.org/project/openlayers
GeoDjango   http://code.djangoproject.com/wiki/GeoDjango
or one under development for Silverstripe.

You will also need tools for managing both raster & vector data to be served as 
maps, and to provide cacheing services to improve performance, and some CMS or 
framework to build & manage your application.


I suggest your toolset includes, but you should look at some such suite as your 
solution, not simply the map production components.

PostGIS for local vector data management
Tilecache for speeding up raster data rendering
mapserver as an OGC WMS/WFS providor
OpenLayers, either directly or through mapfish or Geomoose

HTH,

 Brent Wood



--- On Sun, 6/13/10, yUser  wrote:

> From: yUser 
> Subject: [mapserver-users] Re: Migration to MapServer
> To: mapserver-users@lists.osgeo.org
> Date: Sunday, June 13, 2010, 8:49 AM
> 
> Hello Till,
> 
> Thanks for your reply.
> 
> So based on your answer, this is what I infer:
> The solution is a combination of MapServer and OpenLayers.
> 1. First I find the data from www.openstreetmap.org (maybe
> it is ESRI
> ...have to check) , and then use that to display using
> MapServer.
> 2. Once map is rendered on the client, then OpenLayers will
> help with
> javascript part of drawing polylines on the map.
> 
> Please advise if I am wrong in my understanding.
> Thanks.
> 
> Aside: My main focus at is to have all of this within an
> LAN without any
> internet connection to begin with. Possibly have all the
> map data in a
> Server and then display that and use javascript on the
> client. I already
> have a working application using GoogleMaps API and I need
> to transfer it to
> the new solution. The other reason to have everything
> within LAN is to do
> Load Testing which is bit difficult with Google Maps
> considering that the
> load test might cause Google to block IP - assuming it as a
> DOS attack.
> 
> -- 
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Migration-to-MapServer-tp5169931p5172726.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] Compiling on CentOS 5

2010-06-07 Thread pcreso
See:

http://www.chasedavis.com/2007/apr/29/mapserver-newsroom-part-2/

Personally I prefer to run OpenSuse as a mapserver box, largely due to the work 
the guys who maintain the GEO repository put in to make sure that current 
versions of a wide range of GIS/GPS related applications work well.

There are some Centos/RH packages maintained there ase well, via the OpenSuse 
build service, but mapserver is not included.

http://download.opensuse.org/repositories/Application:/Geo/

& for those wanting a Postgis solution:

http://download.opensuse.org/repositories/Application:/Geo:/


Ubuntu comes second, but note the Debian & Ubuntu repositories are less 
complete in the GIS arena & often version or two behind.

Cheers,

  Brent Wood



--- On Mon, 6/7/10, Peter Hopfgartner  wrote:

> From: Peter Hopfgartner 
> Subject: RE: [mapserver-users] Compiling on CentOS 5
> To: "Worth Lutz" 
> Cc: "'MAPSERVER-USERS'" 
> Date: Monday, June 7, 2010, 7:23 PM
> On Sun, 2010-06-06 at 13:30 -0400,
> Worth Lutz wrote:
> > 
> > Gerry,
> > 
> > I would be interested in your findings.  I am
> trying to install
> > mapserver/mapscript on RHEL 5 but have not found
> current rpms for MapServer.
> > 
> > I'm not much on linux but did get the FGS version
> working.  I was wondering
> > what your experience was and where you found the
> packages to get your system
> > up and running.
> > 
> > Thanks, 
> > Worth
> > 
> > 
> Hi Worth,
> 
> there are current RPMs referenced at
> http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS
> 
> You can follow the RPM packaging of various Open Source GIS
> packages at
> http://lists.osgeo.org/mailman/listinfo/el, the list is
> very low
> traffic.
> 
> Peter
> 
> > 
> > -Original Message-
> > From: mapserver-users-boun...@lists.osgeo.org
> > [mailto:mapserver-users-boun...@lists.osgeo.org]
> On Behalf Of Gerry Creager
> > Sent: Tuesday, May 25, 2010 12:46 PM
> > To: Jeff McKenna
> > Cc: MAPSERVER-USERS
> > Subject: Re: [mapserver-users] Compiling on CentOS 5
> > 
> > Thanks, Jeff: More in-line, below...
> > 
> > On 5/25/10 7:29 AM, Jeff McKenna wrote:
> > > Gerald Creager wrote:
> > >> I'm having to reinstall Mapserver after some
> significant hardware
> > >> issues. I was perusing the documentation and
> find several explicit
> > >> entries for installing on Windows.
> > >>
> > >> For Linux, there's the suggestion to use FGS
> (used it before, isn't
> > >> latest version, but will probably work), or
> Debian. Sorry, guys,
> > >> ubuntu is a debian variant, so while it's
> nice that there's GIS
> > >> systems for debian, they are, to my mind, the
> same.
> > >>
> > >> My question: Where's the information on
> dependencies to compile and
> > >> use Mapserver? If they reside in the pdf
> documentation, I've tried to
> > >> snag it, and the pdf appears damaged:
> unreadable in eVince or Acrobat
> > >> reader.
> > >>
> > >> Looking for suggestions on how I might
> proceed.
> > >>
> > >
> > > Gerry,
> > >
> > > Here are some of my comments:
> > >
> > > - FGS version 9.5 contains MapServer 5.6.3 (the
> latest MapServer
> > > release), I use it often and recommend it
> > 
> > The wiki link to FGS needs to be updated. When I
> followed the link, it 
> > was for 5.4, which I can use, but since we crashed so
> much, I wanted to 
> > go ahead and get current.
> > 
> > > - documentation for compiling MapServer on Unix
> systems is found at:
> > > http://www.mapserver.org/installation/unix.html
> > 
> > I just *knew* it had to be around somewhere. However
> the PDF link 
> > produced a bad download several times for the
> Mapserver docs... That 
> > might bear looking into. I tried it at home, even
> using several methods 
> > to download it, and two readers to look at the
> results, then, last 
> > night, I tried again from home and still failed. Is
> Mapserver allergic 
> > to Texans, perhaps?
> > 
> > In the end, I fell back to what I thought I remembered
> from years past, 
> > and that (surprisingly) worked. It was a bit more work
> than having the 
> > instructions in front of you, but it's good to know I
> could still do it.
> > 
> > > - if you feel like giving back to the community,
> as you travel down the
> > > compilation path you could record your steps in
> the MapServer wiki, so
> > > others can learn from your steps: http://trac.osgeo.org/mapserver/
> > 
> > I'll try to get started on that today. It's been
> awhile since I've 
> > contributed anything save moral support to the
> community, so it's time I 
> > did some good.
> > 
> > gerry
> 
> -- 
> Dott. Peter Hopfgartner
> 
> R3 GIS Srl - GmbH
> Via Johann Kravogl-Str. 2
> I-39012 Meran/Merano (BZ)
> Email: peter.hopfgart...@r3-gis.com
> Tel. : +39 0473 494949
> Fax  : +39 0473 069902
> www  : http://www.r3-gis.com
> 
> XING : http://www.xing.com/go/invita/8917535
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
_

[mapserver-users] help with mapfile postgis query

2010-05-26 Thread pcreso
I'm confused, can anyone help?

I want a random subset of features returned each call from a postgis table via 
a wfs layer. I thought a simple SQL could do this pretty easily, but it doesn't 
work from mapserver.


The mapfile data statement:

DATA "geom_ll from (select gid, geom_ll, name, random() as rand
from coast_poly 
order by rand
limit 1) as foo using unique gid using srid=4326"

This returns 0 features. 

If I change the query to order by gid it works fine & returns 1 feature.
If I retain order by rand but with no limit it works fine & returns all the 
features.


If I paste the queries into a psql terminal, all instances work fine: eg:

select gid, name, random() as rand from coast_poly order by randlimit 1;
 gid | name |   rand
-+--+---
   1 | NORTH ISLAND | 0.409694513771683
(1 row)


But I cannot get mapserver WFS output to work with both a random order & a 
limit:

Source for this layer: 
http://localhost/cgi-bin/mapserv?map=/srv/www/htdocs/map_nz/nz_wms_server.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=nz_land
The number of features in this layer: 0

More confusing is that the WFS extent is correct for the feature that is not 
there:

Extents:
In layer spatial reference system units : xMin,yMin 172.643,-41.6138 : 
xMax,yMax 178.551,-34.3934


& worse, a data statement of:
DATA "geom_ll from (select gid, geom_ll, name, random() as rand
from coast_poly
where gid = 3 or gid=1  
order by rand
limit 2) as foo using unique gid using srid=4326"

sometimes returns 1 & sometimes 0 features (but should return 2), as a wfs 
layer, but as an sql in psql always returns the correct two features, but 
varies the order, as you'd expect:

 corax=# select gid, name, random() as rand
from coast_poly 
where gid = 3 or gid=1
order by rand
limit 2;
 gid |  name  |   rand
-++---
   3 | STEWART ISLAND | 0.102461547125131
   1 | NORTH ISLAND   | 0.609191857278347
(2 rows)

corax=# select gid, name, random() as rand
from coast_poly
where gid = 3 or gid=1
order by rand
limit 2;
 gid |  name  |   rand
-++---
   1 | NORTH ISLAND   | 0.531711789779365
   3 | STEWART ISLAND | 0.784405956044793
(2 rows)


Thanks in advance,

  Brent Wood


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


[mapserver-users] Postgis query bug?

2010-05-20 Thread pcreso

Hi,

I can't get an error with teh sql via psql, but only mapserver, so I'll ask 
here.

I'm using a mapfile with a DATA statement similar to the ones at:
http://mapserver.org/input/vector/postgis.html

The data statement is below...

The random() field, combined with order by & limit is to generate a random 
subset of records from each query.   

I can order by a "genuine" int field & get the expected result in mapserver 
(WFS) response. I can order by a calculated field 'random() as rand' and get 
the expected random sorted list back. I can impose a limit 5 on the fixed order 
by field, & get the 5 records back. All work with the SQL in the psql 
commandline & the mapfile.

However, if I try to order by rand then limit 5, it works fine from the command 
line, but returns no records/features via WFS/mapserver. 

So, with teh layer below, if I change the field to order by to atlas_id (an int 
in the view being queried) it works. If I leave the order by as rand ("random() 
as rand" in the view being queried) with no "limit 5" I get a valid response 
with some 250 records via WFS, if I use "limit n" with the datasets ordered by 
rand, I get zero records returned via WFS, but the metadata shows the data 
extent to be correct.

Any advice appreciated...

Brent Wood

DATA "startp from ( select atlas_id, 
 filename,
 startp,
 rand
  from
   t_station t,
   V_atlas_id a
  where t.trip_code = 'tan0906'
and t.station_no = 241
and t.station_no=a.station_no
and t.trip_code=a.trip_code 
  order by rand
  limit 5
   ) as myquery
   using unique atlas_id using srid=4326"
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapserver vs Geoserver

2010-04-16 Thread pcreso
Hi,

There are differences, like (as you note below) if you require WFS-T then 
mapserver will not be of much use. Most differences are due to the java vs cgi 
underlying approaches. The config gui for geoserver is nice, but a bit of 
experience scribbling (or cut'n pasting) mapfiles means the gui is not that big 
a difference (IMHO)

The fundamental difference for me is that every mapserver mapfile effectively 
instantiates a new OGC service provider with its own set of layers, geoserver, 
however, is a single monolithic service providing all defined layers in the one 
URL.

 I want a single server providing lots of custom WMS/WFS services, from mostly 
PostGIS databases, but also raster tilesets, shapefiles, etc... Mapserver 
provides this (at present) far more easily than geoserver - so my choice is 
simple.

Also, last time I looked, Mapserver works more effectively than Geoserver with 
PostGIS. For example, the mapserver pre-processor with variable substitution 
allows me to provide a mapfile with a single layer, say querying a table of 
recorded species locations with 1200 species, in a single query: " ... where 
species ='%SPP%' ...". The URL querying the service can pass in the value 
mapserver will use in place of SPP when the query is passed to Postgis.

So a single query (layer) in a mapfile provides access to 1200 available 
layers. AFAIK, geoserver cannot provide this sort of functionality & 
flexibility with both embedded SQL queries specifying a layer content & runtime 
variable substitution.

Those are the differences that in my case make mapserver more appropriate. 
Future versions of geoserver may tip the balance :-)

HTH,
  
  Brent Wood


--- On Thu, 4/15/10, mani .,  wrote:

From: mani ., 
Subject: [mapserver-users] Mapserver vs Geoserver
To: mapserver-users@lists.osgeo.org
Date: Thursday, April 15, 2010, 6:07 PM



Hi everyone,       Well  I've been  working on Mapserver for a couple of weeks 
now. Now  I was supposed to checkout Geoserver too.. I was wondering if anyone 
who has worked on both of 
them could help me figure out with a point or two as of how mapserver is 
superior to Geoserver... I've got a few points gathered.
-=- Plz fill me in with any thing that comes to your mind. I really wanna the 
differences , be it the basic things, simplicity or complexity 
or whatever..
Thanks,

Mapserver && Geoserver


1. MapServer is generally better when dealing with WMS, while GeoServer deals 
better with WFS.
2. A big difference is that GeoServer supports WFS-T, that it Transactional WFS 
(editing of feature services on the client side), while MapServer don’t.
3. Mapserver works with CGI, GeoSever with J2EE. That may entail some advantage 
to GeoServer, since some companies don’t want to work with CGI.
4. MapServer is a more mature project (1996), while GeoServer is a bit more 
recent (2003).
5. GeoServer has a web tool administration that eases configuration.
6. MapServer has without any doubt a very powerful cartography system, 
providing data under dynamic vectors with high quality
7. None of them is better or worse. The development objectives are different.
8. PHP Mapscript for Mapserver, which provides a powerful scripting interface 
for PHP programmers. For Java programmers, Geoserver might be a better choice
 

 

 

-Inline Attachment Follows-

___
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] runtime substitution not working

2010-03-14 Thread pcreso

Hi Ben...

I have it working in other setups fine - just this one won't behave.

If I use "like '%spp%'" & pass &spp=TAR, then the query that gets run is
"like 'TAR', which is basically an un-indexed =

I need a "like '%TAR%'" in the SQL hence the double % sign. I have this working 
elsewhere fine (but with different versions of mapserver & Postgis)

Capitalisation might be the problem... I'll try that...


Thanks,

   Brent
 

--- On Sun, 3/14/10, Ben Madin  wrote:

> From: Ben Madin 
> Subject: Re: [mapserver-users] runtime substitution not working
> To: mapserver-users@lists.osgeo.org
> Cc: pcr...@pcreso.com
> Date: Sunday, March 14, 2010, 1:25 PM
> G'day Brent,
>
> It might not matter, but you have double %% in the DATA
> statement you have passed,
>
> and for whatever reason - I recevied advice from this list
> or OpenLayers list - I have all my variable names
> capitalised in the query:
>
>
> WHERE transferdate
> >= '%STARTDATE%' AND transferdate <= '%ENDDATE%'
>
> AND
> line_geom IS NOT NULL
>
> AND
> sourceshire NOT LIKE destinationshire
>
> AND
> sourceshire LIKE '%SOURCESHIRE%'
>
> So I hope these might help if Steve's solution didn't
>
> cheers
>
> Ben
>
>
>
> On 13/03/2010, at 24:00 , mapserver-users-requ...@lists.osgeo.org
> wrote:
>
> > I'm obviously doing something wrong, but can't see
> what it is... I have a Postgis table of species occurences
> & I want to pass a variable to the mapfile to select
> which speciesusing runtime substitution.
> >
> > The relevant DATA statement (joining species in the
> catch to locations in the station) in the mapfile is:
> >
> > DATA "startp from (select c.id, s.startp, s.trip_code,
>
> >   
>  
> s.station_no, c.species,
> >   
>   c.weight
> >   
>from t_station s, catch c
> >   
>where
> s.station_no=c.station_no
> >   
>  and c.species ilike
> '%%spp%%')
> >   
>as myquery
> >   
>using unique id using
> srid=4326"
> >
> >
> > The query works in Postgis & in the mapfile (via
> QGIS) when I hard code the %spp% (eg, to 'TAR')
> >
> > I'm using QGIS to open the layer, with the URL:
> > http://wms-dev/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/catch.map&spp=TAR
> >
> > QGIS appends the request type, etc & it works with
> the hard coded "spp"
> >
> > The mapfile also has:
> >METADATA
> >  "wms_title" "species"
> > 
> "wms_srs"   "epsg:4326"
> >  "wfs_title" "species"
> >  "wfs_version" "1.0.0"
> >  "wfs_typename" "species"
> >  "wfs_request_method" "GET"
> >  "wfs_service" "WFS"
> >  "spp_validation_pattern"
> '^[A-Z0-9][A-Z0-9][A-Z0-9]$'
> >END
> >
> > The version I'm running is MapServer version 5.4.1
> > (so no default supported)
> >
> > The docs say I can use shp2img to test runtime
> substitution in a mapfile, but I can't see how to invoke the
> substitution with the equivalent of a spp=TAR statement to
> test this.

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


[mapserver-users] runtime substitution not working

2010-03-11 Thread pcreso
Hi,

I'm obviously doing something wrong, but can't see what it is... I have a 
Postgis table of species occurences & I want to pass a variable to the mapfile 
to select which speciesusing runtime substitution.

The relevant DATA statement (joining species in the catch to locations in the 
station) in the mapfile is: 

DATA "startp from (select c.id, s.startp, s.trip_code, 
  s.station_no, c.species,
  c.weight 
   from t_station s, catch c
   where s.station_no=c.station_no
 and c.species ilike '%%spp%%') 
   as myquery
   using unique id using srid=4326"


The query works in Postgis & in the mapfile (via QGIS) when I hard code the 
%spp% (eg, to 'TAR')

I'm using QGIS to open the layer, with the URL:
http://wms-dev/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/catch.map&spp=TAR

QGIS appends the request type, etc & it works with the hard coded "spp"

The mapfile also has:
METADATA
  "wms_title" "species"
  "wms_srs"   "epsg:4326"
  "wfs_title" "species"
  "wfs_version" "1.0.0"
  "wfs_typename" "species"
  "wfs_request_method" "GET"
  "wfs_service" "WFS"
  "spp_validation_pattern" '^[A-Z0-9][A-Z0-9][A-Z0-9]$'
END

The version I'm running is MapServer version 5.4.1
(so no default supported)

The docs say I can use shp2img to test runtime substitution in a mapfile, but I 
can't see how to invoke the substitution with the equivalent of a spp=TAR 
statement to test this. 


Any suggestions? 

  Thanks

Brent Wood

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


Re: [mapserver-users] LABEL-formatting options

2010-03-10 Thread pcreso
Yep, always frustrating to suffer such constraints.

Can you not define the layer in mapserver as an ogr layer rather than a native 
shapefile, and use ogr's pseudo-sql to cast/retrieve the value as a numeric 
more suitable for labeling with?

http://www.gdal.org/ogr/ogr_sql.html

Then in your mapfile use connectiontype ogr, as in:
http://mapserver.org/input/vector/ogr.html 

(see example 4 with shapefiles joined in an ogr query)

I agree it would be nice to have mapserver able to do this, but until then 
there should be some workaround (like this) that will suffice.

Cheers,

 Brent


--- On Wed, 3/10/10, Stephan Holl  wrote:

> From: Stephan Holl 
> Subject: Re: [mapserver-users] LABEL-formatting options
> To: pcr...@pcreso.com
> Cc: mapserver-users@lists.osgeo.org
> Date: Wednesday, March 10, 2010, 9:09 PM
> Hello Brent,
> 
> pcr...@pcreso.com,
> [20100309 - 23:49:56]
> 
> > Hi Stephan,
> > 
> > Can you not add an appropriate column automatically as
> the shapefile
> > is generated?
> > 
> > Tools such as dbfscript (http://www.whitetown.com/dbf-script/) or
> > perhaps script something with the shapelib libraries
> or tools or the
> > ogr tools?
> 
> Yes, it is possible. 
> 
> But: I think it is a feature which mapserver should deal
> with.
> 
> > 
> > I have found that using Postgis rather than shapefiles
> gives you the
> > ability to easily manage such issues as the data
> retrieved by
> > mapserver is derived from an SQL query which allows
> the creation of
> > virtual "columns" for labels on the fly.
> 
> In our case we do not have a chance to use any DB at all,
> since the
> infrastructure permits it. The data are retrieved from
> caclculations,
> which are itself done on a (remote) server.
> 
> > 
> > Treating this sort of problem as a data management
> problem, in terms
> > of supplying the desired data derived on the fly from
> the stored
> > data, allows a tool such a Postgis to do what a
> database is designed
> > for. A script using shp2pgsql or ogr2ogr to
> automatically turn your
> > shapefile into a Postgis table, and render this using
> mapserver
> > instead of the shapefile should fix your problem.
> 
> As said, the specific infrastructure (sadly) does not allow
> to use
> PostGIS and the like (yet) 
> I am after a more general approach (in
> order to make MapServer a little better), for my usecase it
> is easy to
> add a 'display'-column with the right decimal values
> trimmed.
> 
> Cheers
>     
>     Stephan
> 
> > > On Behalf Of Stephan Holl [stephan.h...@intevation.de]
> > > Sent: Tuesday, March 09, 2010 7:54 AM
> > > To: mapserver-users@lists.osgeo.org
> > > Subject: [mapserver-users] LABEL-formatting
> options
> > > 
> > > Hello mapservers,
> > > 
> > > we are using MapServer for visualizing shapefiles
> with
> > > double entries
> > > inside.
> > > 
> > > Mainly this are contour-lines from waterdepth.
> The double
> > > values have
> > > 32 decimal places and mapserver tries to render
> them _all_
> > > along a
> > > contourline.
> > > This does not look nice...
> > > 
> > > Is there an option to trim the values with a
> dedicated
> > > mapfile-parameter, e.g. where a prinft-syntax can
> be used
> > > to format the
> > > values?
> > > 
> > > The shapefiles are generated automatically so
> adding
> > > another column with
> > > trunc()ed or round()ed values is no option.
> > > 
> > > Are there any options to format
> label-values/strings? I
> > > have not found
> > > anything in the docs.
> > > 
> > > TIA
> > > 
> > >         Stephan
> > > 
> > > --
> > > Stephan Holl 
> > > | Tel.: +49 (0)541-33 508 3663
> > > Intevation GmbH, Neuer Graben 17, 49074 OS  | 
> AG
> > > Osnabrück - HR B 18998
> > > Geschäftsführer:  Frank Koormann, Bernhard
> Reiter,
> > > Dr. Jan-Oliver Wagner
> > > ___
> > > mapserver-users mailing list
> > > mapserver-users@lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > > 
> 
> 
> -- 
> Stephan Holl 
> | Tel.: +49 (0)541-33 508 3663
> Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG
> Osnabrück - HR B 18998
> Geschäftsführer:  Frank Koormann, Bernhard Reiter,
> Dr. Jan-Oliver Wagner
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] LABEL-formatting options

2010-03-09 Thread pcreso
Hi Stephan,

Can you not add an appropriate column automatically as the shapefile is 
generated?

Tools such as dbfscript (http://www.whitetown.com/dbf-script/) or perhaps 
script something with the shapelib libraries or tools or the ogr tools?

I have found that using Postgis rather than shapefiles gives you the ability to 
easily manage such issues as the data retrieved by mapserver is derived from an 
SQL query which allows the creation of virtual "columns" for labels on the fly.

Treating this sort of problem as a data management problem, in terms of 
supplying the desired data derived on the fly from the stored data, allows a 
tool such a Postgis to do what a database is designed for. A script using 
shp2pgsql or ogr2ogr to automatically turn your shapefile into a Postgis table, 
and render this using mapserver instead of the shapefile should fix your 
problem.


Cheers,

  Brent Wood

> On Behalf Of Stephan Holl [stephan.h...@intevation.de]
> Sent: Tuesday, March 09, 2010 7:54 AM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] LABEL-formatting options
> 
> Hello mapservers,
> 
> we are using MapServer for visualizing shapefiles with
> double entries
> inside.
> 
> Mainly this are contour-lines from waterdepth. The double
> values have
> 32 decimal places and mapserver tries to render them _all_
> along a
> contourline.
> This does not look nice...
> 
> Is there an option to trim the values with a dedicated
> mapfile-parameter, e.g. where a prinft-syntax can be used
> to format the
> values?
> 
> The shapefiles are generated automatically so adding
> another column with
> trunc()ed or round()ed values is no option.
> 
> Are there any options to format label-values/strings? I
> have not found
> anything in the docs.
> 
> TIA
> 
>         Stephan
> 
> --
> Stephan Holl 
> | Tel.: +49 (0)541-33 508 3663
> Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG
> Osnabrück - HR B 18998
> Geschäftsführer:  Frank Koormann, Bernhard Reiter,
> Dr. Jan-Oliver Wagner
> ___
> 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: Rendering overlapping data

2009-12-22 Thread pcreso
Hi,

The issue seems to be about decomposing polygons to their constituents, much 
like normalising a database schema.

In fact, using Postgis with a normalised data structure, managing this is 
relatively trivial. Polygons & polygon classes (categories) are a typical many 
to many relationship, which is handled very well in a relational database.

Decompose all your polygons in a Postgis table, with a suitable primary key. 
Some polygons (regions of overlap) will be members of more than one class.

Build a table with a list of unique classes describing all possible classes.

Build a table (relation) with the keys of polygons in one column & classes in 
another. Thus each class can relate to many polygons & each polygon can be in 
more than one class (eg: polygons of overlaps)

Your mapfile can use separate layers to plot one class per layer, using a query 
on the database to return the appropriate polygons, or you can define multiple 
classes in a single layer.

Your problem is that mapserver only renders polygons. It does not divide 
polygons & crop them by areas of overlap with other polygons. So you need a 
tool to manage the fully decomposed polygons, so that, for example, two 
overlapping polygons are actually provided to mapserver as three separate 
polygons, the overlapping region as one polygon & the two non-overlapping parts 
as separate polygons.

Also note that depending on your requirements, you could have a map layer 
defined by an SQL in Postgis which returned the overlapping region calculated 
on the fly in a spatial query, so you could render the two polygons first, then 
overlay the overlap... if that makes sense...

If you have areas where many polygons overlap, then it can be managed, but may 
get a bit complex... 

HTH,

  Brent Wood

If polygons overlap, then the area of overlap is a polygon in it's own right.

--- On Tue, 12/22/09, Peter Hopfgartner  wrote:

> From: Peter Hopfgartner 
> Subject: Re: [mapserver-users] RE: Rendering overlapping data
> To: "Ludwig Kniprath" 
> Cc: mapserver-users@lists.osgeo.org
> Date: Tuesday, December 22, 2009, 9:38 PM
> Ludwig Kniprath wrote:
> > I dont't think, Mapserver has the out-of-the-box
> possibility to render the overlapping parts of polygons in a
> special way. Perhaps you could try to create a separate
> layer (f. e. in Postgis with a special geo-query), that just
> shows these overlapping parts. But also then I think its
> difficult to query and to render the case, that three or
> more polygons do overlap.
> > 
> > Ludwig
> > 
> >   
> Hi Ludwig,
> 
> out of curiosity:
> 
> How do other software packages handle this case?
> 
> Are there some best practices? For example dividing the
> intersection area into stripes and cycle through the colors
> of the overlapping data?
> 
> Does GeoServer have some way to visualize overlapping
> data?
> 
> Would it make sense to collect some requirements to
> formulate an RFC?
> 
> Regards,
> 
> Peter
> >> Message: 2
> >> Date: Mon, 21 Dec 2009 17:22:44 +0100
> >> From: Peter Hopfgartner 
> >> Subject: [mapserver-users] Rendering overlapping
> data
> >> To: mapserver-users@lists.osgeo.org
> >> Cc: d'Orio Pietro 
> >> Message-ID: <4b2fa0d4.7020...@r3-gis.com>
> >> Content-Type: text/plain; charset=ISO-8859-1;
> format=flowed
> >> 
> >> Dear list members
> >> 
> >> We would like to visualize a layer with data,
> where polygons with different classes may overlap. Using
> transparency, "new" colors are introduced, e.g. if I overlap
> a blue and a red polygon I get an violet one.
> >> 
> >> Is there a way to show overlapping polygons in
> stripes with cycling colors, or as a checker board? How do
> people handle this?
> >> 
> >> Regards,
> >> 
> >> Peter
> >> 
> >> -- 
> >> Dott. Peter Hopfgartner
> >> 
> >> R3 GIS Srl - GmbH
> >> Via Johann Kravogl-Str. 2
> >> I-39012 Meran/Merano (BZ)
> >> Email: peter.hopfgart...@r3-gis.com
> >> Tel. : +39 0473 494949
> >> Fax  : +39 0473 069902
> >> www  : http://www.r3-gis.com
> >>     
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> >   
> 
> 
> -- 
> Dott. Peter Hopfgartner
> 
> R3 GIS Srl - GmbH
> Via Johann Kravogl-Str. 2
> I-39012 Meran/Merano (BZ)
> Email: peter.hopfgart...@r3-gis.com
> Tel. : +39 0473 494949
> Fax  : +39 0473 069902
> www  : http://www.r3-gis.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] cascading WMS with mapserver

2009-12-11 Thread pcreso
Hi,

I'd like to set up a local mapfile which provides a layer from 
http://wms.jpl.nasa.gov/wms.cgi

What I can't find in the mapserver docs is exactly what I put into the 
CONNECTION string to specify the layer I want from this server. 

The capabilities doc returned lists several layer, I want to provide just one 
via a local mapserver implementation.

Any suggestions?

Thanks,

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


Re: [mapserver-users] Mapserver error: "Web application error. Missingmagic string, ..."

2009-10-27 Thread pcreso
Thanks guys...

That was most certainly it :-)

Cheers,

  Brent

--- On Wed, 10/28/09, Bob Basques  wrote:

> From: Bob Basques 
> Subject: Re: [mapserver-users] Mapserver error: "Web application error. 
> Missingmagic string, ..."
> To: pcr...@pcreso.com
> Date: Wednesday, October 28, 2009, 12:39 PM
> Brent,
> 
> This should help:
> 
> http://mapserver.org/development/rfc/ms-rfc-56.html?highlight=magic%20string
> 
> bobb
> 
> 
> 
> >>> 
> 10/27/09 6:25 PM >>>
> I have an html template that worked fine with an earlier
> version of Mapserver, but not with v5.4.1
> 
> The error mesage is: 
> 
> Content-type: text/html isValidTemplate(): Web application
> error. Missing magic string,
> /srv/www/htdocs/mapdata/linz_topo/linz_250_template.html
> doesn't look like a MapServer template.
> 
> I can't find any docs to help identify what the error is
> & how to fix it.
> 
> Any advice appreciated
> 
>   Brent Wood
> 
> 
> The (short) html template I was using is:
> 
> 
>  
>     Mapserver LINZ250
> prototype
>  
>  
>     Mapserver demonstration of
> LINZ250 data
>     action="/cgi-bin/mapserv">
>       cellspacing="0" cellpadding="4">
>      
>      
>      
> 
>       SRC="[img]" width=600 height=480 border=0
>      ALT="Map Image">
>       value="/srv/www/htdocs/linz_topo/linz250.map">
>       name="imgxy"     value="[center_x]
> [center_y]" >
>       name="imgext"    value="[mapext]" >
>       name="map"       value="[map]"
> >
>       name="savequery" value="true" >
>       name="mapext"    value="shapes" >
>       value="Redraw/Update">
> 
>      Zoom In    type=radio name=zoomdir value=1 [zoomdir_1_check]>
>          
>      Re-center  name=zoomdir value=0 [zoomdir_0_check]>
>          
>      Zoom Out   type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
>          
>      Zoom size  name=zoomsize size=3 value=[zoomsize]>
> 
>      
>      
>    
>    
> 
>  
>  
> 
> 
> ___
> 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] Mapserver error: "Web application error. Missing magic string, ..."

2009-10-27 Thread pcreso
I have an html template that worked fine with an earlier version of Mapserver, 
but not with v5.4.1

The error mesage is: 

Content-type: text/html isValidTemplate(): Web application error. Missing magic 
string, /srv/www/htdocs/mapdata/linz_topo/linz_250_template.html doesn't look 
like a MapServer template.

I can't find any docs to help identify what the error is & how to fix it.

Any advice appreciated

  Brent Wood


The (short) html template I was using is:


 
Mapserver LINZ250 prototype
 
 
Mapserver demonstration of LINZ250 data
   
 
 
 
 

 
 
 
 
 
 
 
 

 Zoom In   
 
 Re-center 
 
 Zoom Out  
 
 Zoom size 

 
 
   
   

 
 


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


[mapserver-users] WMS/WFS metadata for GeoNetwork harvesting

2009-10-24 Thread pcreso
Hi,

I'd like to use mapserver as a WMS/WFS server for a variety of map layers.

I'm using GeoNetwork as a metadata tool/manager.

GeoNetwork can harvest metadata from an OGC WMS/WFS server, and the layer 
management tools for geoserver facilitate the entry of some of these metadata 
fields, but I'd prefer to use mapserver if possible.

The mapserver docs only give a simple example of OGC metadata fields in a 
mapfile, & I'm after a more complete set of fields suitable for automatic 
harvesting.

Does anyone know where I can find such examples?


Thanks,

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


Re: [mapserver-users] mapfile filter & variable substitution question

2009-10-10 Thread pcreso
Hi Jennifer,

Outside of using mapscript to parse the the variable and generate the 
appropriate sql, there is a simple Postgres solution. Store your "year" column 
as a char(4) instead of int & index it. (So "like" will work on it without 
casting)

Have OpenLayers return a "%" for the "ALL YEARS"  selection (instead of a 
single year) and have your query in the mapfile use like as well as  "=" as 
below.

Individual years will be identified with the "=" operator & all years by 
"like", as below, where I pass the sql both a '%' & the year '2000' as examples.

HTH,

 Brent Wood


test=# create table test (id serial primary key , year char(4));
NOTICE:  CREATE TABLE will create implicit sequence "test_id_seq" for serial 
column "test.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey" for 
table "test"
CREATE TABLE
test=# insert into test values (default, '1999');
INSERT 0 1
test=# insert into test values (default, '2000');
INSERT 0 1
test=# insert into test values (default, '2001');
INSERT 0 1
test=# select * from test where year='%' or year like '%';
 id | year
+--
  1 | 1999
  2 | 2000
  3 | 2001
(3 rows)

test=# select * from test where year='2000' or year like '2000';
 id | year
+--
  2 | 2000
(1 row)






--- On Sun, 10/11/09, Jennifer Shanks  wrote:

> From: Jennifer Shanks 
> Subject: [mapserver-users] mapfile filter & variable substitution question
> To: mapserver-users@lists.osgeo.org
> Date: Sunday, October 11, 2009, 6:29 AM
> Hi,
> 
> I have a question about using the mapfile Filter option
> with variable 
> substitution.  In my user interface (OpenLayers), I
> have drop down boxes 
> that allow users to filter the data display based on
> selected year and 
> selected category.  Accordingly, I have two filters
> set up in my mapfile: 
> 
>   FILTER "year = %selected_year%" 
>   FILTER "category=%selected_category%" 
> 
> What if the user wants to see data for all years or for all
> categories?  
> Is there a way that I can submit a wildcard in my mapserv
> URL instead?  
> Or is there some other way to do this?  My data source
> is a PostGIS.
> 
> Regards,
> Jennifer
> 
> ___
> 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] Preparing GeoTIFF files for use in Mapserver

2009-09-20 Thread pcreso
Hi Robert,

Can you check to see that 2193 (NZTM2000) is included in the look-up table of 
projections used by GDAL?

If not, you might try fully describing the parameters in proj.4 syntax instead 
of using the EPSG notation, see:

http://spatialreference.org/ref/epsg/2193/

Cheers,

  Brent Wood




--- On Mon, 9/21/09, Robert Sanson  wrote:

> From: Robert Sanson 
> Subject: [mapserver-users] Preparing GeoTIFF files for use in Mapserver
> To: mapserver-users@lists.osgeo.org
> Date: Monday, September 21, 2009, 12:31 PM
> 
>  
>  
>  
> Hi 
>  
> I am trying to use gdal_translate to convert some
> image files (PNGs and JPEGs) into GeoTIFFs for using in
> Mapserver. I am using the gdal_translate utility. The
> problem I am having is getting the proper Projection
> information embedded. I want to assign EPSG:2193 (NZGD2000 /
> New Zealand Transverse Mercator 2000).
>  
> I have .jgw / .pgw worldfiles and ESRI .prj files for
> my input files.
>  
> When I try:
>  
> gdal_translate -of GTiff -co "TILED=YES"
> -a_srs "EPSG:2193" infile.jpg outfile.tif
>  
> then examine outfile.tif with gdalinfo, it
> shows:
>  
> PROJCS["unnamed",
> GEOGCS[,
>
> DATUM["unknown",
>
> SPHEROID["unretrievable - using
> WGS84",6378137,298.257223563]],
>
> PRIMEM["Greenwich",0],
>
> UNIT["degree",0.0174532925199433]],
> UNIT["metre",1,
>
> AUTHORITY["EPSG","9001"]],
>
> AUTHORITY["EPSG","2193"]]
>  
> It doesn't seem to be finding the correct EPSG
> reference. I have GDAL_DATA environment variable specified,
> and have also included it in my path. I am using the gdal
> utilities that came with ms4w.
>  
> Many thanks,
>  
> Robert Sanson
> 
> 
> --
> 
> The contents of this email are confidential to AsureQuality. If you have 
> received this communication in error please notify the sender immediately and 
> delete the message and any attachments. The opinions expressed in this email 
> are not necessarily those of AsureQuality. This message has been scanned for 
> known viruses before delivery. AsureQuality supports the Unsolicited 
> Electronic Messages Act 2007. If you do not wish to receive similar 
> communications in future, please notify the sender of this message.
> 
> --
> 
> 
> This message has been
> scanned for malware by SurfControl plc.  www.surfcontrol.com
>  
> 
> -Inline Attachment Follows-
> 
> ___
> 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] expected speeds.

2009-05-06 Thread pcreso

Hi Sam,

You have no mentioned whether or not you created spatial indices on your 
geometries. Such indexes won't help much when plotting the entire dataset, but 
will dramatically improve plotting (retrieving) subsets of it.

I suggest you use the PostGIS function ST_SimplifyPreserveTopology() to 
populate an extra geometry column in each table, which should have 
significantly fewer vertices. Then in your mapfile, use scales dependent 
layers, so that when zoomed out you use the simplified column, and at larger 
scales you use the full resolution column. You can assign these to the same 
group, so they are treated as a single layer from the user's perspective, but 
mapserver retrieves and renders data at a detail (& hence volume) appropriate 
for the current scale automatically. When you zoom out, you seldom need the 
full resolution data, so simplified versions are fine, and much faster.

This is the vector data equivalent of raster layers at different resolutions to 
support zoom layering (or scale based layers).

If you have the cpu & memory, PostGIS can be fast enough to have the simplified 
layer generated as a view on the full dataset, or as a query in the mapfile 
data definition sql, but given your specs, a separate column will probably give 
better results.


Cheers,

   Brent Wood 


--- On Thu, 5/7/09, Robert Sanson  wrote:

> From: Robert Sanson 
> Subject: Re: [mapserver-users] expected speeds.
> To: "Sam Ingarfield" , 
> mapserver-users@lists.osgeo.org
> Date: Thursday, May 7, 2009, 8:48 AM
> 
>  
>  
>  
> Hi Sam
>  
> I would try turning the Coastline layer into a
> Shapefile and serving it from the Mapserver machine in a
> local directory. Postgis is probably overkill given the
> layer is probably static (unlikely to need changing).
>  
> regards,
>  
> Robert
> 
> >>> Sam Ingarfield 
> 7/05/2009 2:27 a.m. >>>
> Hi;
> 
> I've just been through a bit of an optimisation process
> on my server and was wondering whether the speeds that I am
> obtaining are somewhat inline with what could be expected
> with the hardware/datasets that are in use.
> 
> Firstly: Hardware.
> 2.2Ghz Xeon (Single Core, but with hyperthreading. not that
> hyperthreading helps much.)
> 1.2Gb Memory coupled with over 2Gb of swap (was filling up
> memory and original swap reay fast so swap was
> expanded)
> Data being served off an array of three ultra320 15k scsi
> drives in a raid-5 config.
> 
> Software.
> OS: Debian
> Mapserver: Nighly build as of 6/5/09, in fastcgi mode
> Data source: Postgis database
> 
> Data:
> Coastline Layer (9 Polygons with a stupid number of
> vertices, this is a known slow point due to toast table
> problems. or at least we think it is)
> Islands Layer (~9000 polygons, only ~4mb)
> Internal Waterbodies layer (~11000 polygons, plus ~1.2m
> lines, 800mb all up)
> 
> Performance:
> On a moderate zoom level, about 2s per 256x256 tile.
> On more zoomed out levels, process times out before
> completing. and yes, some generalisation needs to take place
> at further out zoomage but thats not sorted yet.
> If i drop the coastline layer out (the toast problem one),
> speed ups to like 80-100ms/tile
> 
> 
> So, watchathink?
> 
> 
> 
> 
> Click here
> to report this email as spam.
> 
> 
> --
> 
> The contents of this email are confidential to AsureQuality. If you have 
> received this communication in error please notify the sender immediately and 
> delete the message and any attachments. The opinions expressed in this email 
> are not necessarily those of AsureQuality. This message has been scanned for 
> known viruses before delivery. AsureQuality supports the Unsolicited 
> Electronic Messages Act 2007. If you do not wish to receive similar 
> communications in future, please notify the sender of this message.
> 
> --
> 
> 
> This message has been
> scanned for malware by SurfControl plc.  www.surfcontrol.com
>  
> 
> -Inline Attachment Follows-
> 
> ___
> 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 File for Open Street Map symbology

2009-02-07 Thread pcreso
If you want to keep the original column names in the underlying table, but have 
issues with mapserver being unable to use these for whatever reason, you can 
implement a database view on the table with renamed columns as necessary for 
Mapserver to access them. 

Works well & is one example of the advantages of managing your spatial data 
inside a database.


HTH,

  Brent Wood


--- On Sun, 2/8/09, thomas bonfort  wrote:

> From: thomas bonfort 
> Subject: Re: [mapserver-users] Map File for Open Street Map symbology
> To: "Lars Lingner" 
> Cc: mapserver-users@lists.osgeo.org
> Date: Sunday, February 8, 2009, 10:29 AM
> On Sat, Feb 7, 2009 at 12:57, Lars Lingner
>  wrote:
> > Rahkonen Jukka schrieb:
> >> Lars Lingner wrote:
> >>
> >>
> >>
> >>> I see that you also had to rename the column
> "natural". As this is an
> >>> reserved name by postgres, is there an way to
> use such a name in an
> >>> mapserver expression?
> >>> Although renaming the column did work for me I
> just want to know how to
> >>> quote correctly.
> I don't think you can if you need to do a string
> comparison in your
> sql where clause, as there's no way in mapserver to
> escape the ' or "
> characters
> 
> 
> >
> > DATA "way from (select way,osm_id ,name from
> planet_osm_polygon where
> > 'natural'='water'  ) as foo using
> unique osm_id using srid=900913"
> >
> > was not working... but I just tried it again, just to
> make sure I don't
> > say anything wrong... and its working. *doh*
> 
> it's a valid sql clause, but useless for mapserver as
> it won't return
> any data (as the string 'water' and
> 'natural' are never equal)
> 
> regards,
> thomas
> ___
> 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: [OpenLayers-Users] WFS Server Control output by scale?

2009-02-06 Thread pcreso
Hi,

I have found that using PostGIS for this has some nice options. USe different 
zoom or scale based layers, with MINSCALE, MAXSCALE parameters.
Mapserver providing the layers via WFS, as a single group of scale dependent 
queries on the same table.

That way you can have one table with all the data, but the mapfile has several 
zoom layers applying SQL queries to redusce the data volume. One example, for 
what was a 150Mb shapefile of depth contours, summarised  below.

By tweaking the simplify parameter (which applies a vey fast Peuker-Douglas 
generalisation to each linestring) and adjusting which contours are rendered, 
the WFS server always sends roughly the same volume of data to the client, so 
performance is about the same, irrespective of scale. And the best thing is, 
you only use one full resolution data source. Zoomed out we don't need all the 
data in full precision for a large extent, zoomed in & we can display high 
precision data for a small extent.



zoomed out, select only some depths and simplify by 5km
  "select depth, simplify(geom,5000) as geom from contours 
   where depth = 250
  or depth = 500
  or depth = 1000
  or depth = 5000;"

zooming in, add more depth lines & reduce the simplification
   "select depth, simplify(geom, 1000) as geom from contours
where depth = 250
   or depth = 500
   or depth = 1000
   or depth = 2500
   or depth = 5000;

zoom in further, simplify by 100 & add 100, 250, 500, 750, 1000, 2000, 3000, 
4000. 5000 contours

zoomed fully: "select depth, geom from contours;"
   
Hth,

   Brent Wood



--- On Sat, 2/7/09, Alexandre Dube  wrote:

> From: Alexandre Dube 
> Subject: [mapserver-users] Re: [OpenLayers-Users] WFS Server Control output 
> by scale?
> To: "Stephen Woodbridge" 
> Cc: "openlayers user list" , "mapserver-users" 
> 
> Date: Saturday, February 7, 2009, 2:49 AM
> Hi Stephen,
> 
> Like Eric said, using minScale and maxScale in your layer
> options should do what you're want to do.
> 
> I also had a similar problem trying to display vector
> polygons at small scales ( like 1:1300 ). Here's
> what I did :
> 
> - I determined fixed scales to work with
> - I normalized my shapefile to have one per scale
> - Then you can have one Layer.WFS per data set only visible
> when at their scale OR you could use the customized
> Options-by-zoom strategy I made, see the example (1).
> 
> Best of luck,
> 
> Alexandre
> 
> (1) http://dev4.mapgears.com/bdga/options-by-zoom-bdga.html
> 
> Stephen Woodbridge wrote:
> > Hi all,
> > 
> > I'm using mapserver as a WFS server with
> OpenLayers to serve some polygons. How does one control at
> what scale mapserver will respond to WFS requests. It looks
> like OpenLayers makes its request based on a min/max
> extents. How do you control this? Can you easily limit when
> OpenLayers makes request if you are using fixed scales based
> on the scale? or control mapserver based on size/area of
> extent?
> > 
> > I'm not seeing anything in either projects
> documentation.
> > 
> > I could use a clue or pointer to docs.
> > 
> > Thanks,
> >-Steve
> > ___
> > Users mailing list
> > us...@openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >   
> 
> 
> -- Alexandre Dubé
> Mapgears
> 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-users] opensource software for 3d gis

2009-01-30 Thread pcreso
Hi,

Try OpenDX, or the VTK libraries for full 3D & interactive/animated 
capabilities. GMT can draw nice 3D maps, but is not interactive, but scripted. 
GRASS has nviz, & there are other packages like viz5D.

Conventional raster images used with GIS are not 3D, so you need to drape them 
over a 3D object.

http://www.opendx.org
http://www.vtk.org
http://gmt.soest.hawaii.edu
http://grass.itc.it/
http://www.ssec.wisc.edu/~billh/vis5d.html / http://vis5d.sourceforge.net/

Cheers,

  Brent



--- On Sat, 1/31/09, rohan phatak  wrote:

> From: rohan phatak 
> Subject: [mapserver-users] opensource software for 3d gis
> To: mapserver-users@lists.osgeo.org
> Date: Saturday, January 31, 2009, 12:34 AM
> hello friends,
> i am doing project on 3-d visualization using open source
> software. So
> do you know any software which can be display raster +
> vector + 3d
> data on it?? i am using open source because lot of people
> can see
> their data in 3d format.
> thanks in advance : )
> ___
> 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] GIS and GPS

2009-01-27 Thread pcreso

The script/program that inserts the points needs to check for the distance from 
such features. How you do this is very much up to you. Custom Postgis functions 
& Postgres triggers, or entirely in your script.

This process is pretty simple, but the code wrapped around it to implement a 
useful application will be more complex.

The basic process will be much the same however you implement it:
(I'm assuming that you are recording the points, not just checking them, and 
have an active layer in mapserver which displays the points or features which 
are identified when the point gets within range)

Insert point into table
Check if any required features are closer than your minimum distance from 
  the point
Set a flag or insert a record in the database which will be picked up by the 
mapserver layer to display these.
Do anything else you need in such cases

Insert next point & repeat

(Also: create a process for removing such flags or records when they are no 
longer needed)


 
> Hello, I'm trying to develop an application that takes
> points input from a GPS ... And I would like to realize when
>  those points enter at certain points .. Suppose a state or
> cities... I'm working with Mapserver and PostGIS ..
> Someone can give me an idea of how to accomplish this?

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


[mapserver-users] Government Open Source Software Resource Center

2009-01-19 Thread pcreso
Apologies for scatter posting this, but I have not seen it mentioned anywhere 
before, and it seems an interesting initiative for anyone using or planning to 
use FOSS tools, etc, in government related projects.

Generally:
http://www.gossrc.org/

And specifically geographically related:
http://www.gossrc.org/geographical

Cheers,

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


Re: [mapserver-users] Mapserver MS SQL Server Spacial

2009-01-08 Thread pcreso



--- On Fri, 1/9/09, Richard Greenwood  wrote:

> From: Richard Greenwood 
> Subject: Re: [mapserver-users] Mapserver MS SQL Server Spacial
> To: "Donald Kerr" 
> Cc: mapserver-users@lists.osgeo.org
> Date: Friday, January 9, 2009, 4:56 PM
> On Thu, Jan 8, 2009 at 6:33 AM, Donald Kerr
>  wrote:
> > Is it possible to connect to MS SQL Server Spacial in
> the same was as
> > PostGis?
> 
> 
> I do not think that Microsoft SQL Server is officially
> supported in
> MapServer yet, however you can get it working using
> binaries at:
>  
> http://vbkto.dyndns.org:1280/tests/release-1400-20081013.zip
> 
> read the thread at:
>  
> http://mail.google.com/mail/?ui=2&ik=a8159b4950&view=cv&fs=1&tf=1&ver=a9SCC6X1Wbg&am=x_k6ocT3aCEJBf1qUObqFA&q=release-1400-20081013.zip&search=query&th=11cf6af5d8018b96&qt=release.1.1400.1.20081013.1.zip.1
> 
> The relevant line in the layer object in the MapFile:
>CONNECTIONTYPE PLUGIN
>PLUGIN "msplugin_mssql2008.dll"
>CONNECTION "server=.\SQLEXPRRESS;
> database=sc_lands; Integrated
> Security=true"
>DATA "geom FROM ownership WITH (INDEX(geom_sidx))
> USING SRID=0
> USING UNIQUE id"
> 
> HTH,
> Rich
> 
> -- 
> Richard Greenwood
> richard.greenw...@gmail.com
> www.greenwoodmap.com
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] produce hardcopy maps

2008-12-19 Thread pcreso

Hi,

I'm currently involved in developing an application using Postgis, mapserver, 
OpenLayers & GMT which needs to generate interactive mapserver maps as well as 
maps suitable for publication in a scientific journal.

The vector data is held in Postgis, with some raster backgrounds via WMS. A 
mapserver based application via OpenLayers allows users to plot user selected 
subsets of the vector data, & a GMT tab in the application allows publication 
quality maps to be produced with GMT, then downloaded. It is pretty basic at 
present, pretty much a prototype, but we are considering expanding the 
fuctionality so that the GMT map picks up the user selections on the mapserver 
tab so the GMT extent, data layers, etc, will default to those in the mapserver 
tab.

The main reason for this is we are working with data around Antarctica, where a 
polar plot is ideal, but not that easy to manage with mapserver, so a 
rectangular mapserver map, while distorted, is adequate for data browsing, but 
for cartographic output, it is not good enough. GMT can generate good quality 
polar plots, so we can generate those & make them available as ps or png 
images, (png allows preview in the browser).

Cheers,

  Brent Wood



--- On Sat, 12/20/08, Brent Fraser  wrote:

> From: Brent Fraser 
> Subject: Re: [mapserver-users] produce hardcopy maps
> To: "José María Michia" 
> Cc: mapserver-users@lists.osgeo.org
> Date: Saturday, December 20, 2008, 9:14 AM
> José,
> 
>  I would agree that the current implementation of PDF
> output is not suitable for producing printed maps.  I'll
> be looking into fixing some of the open tickets (and other
> bugs I've found), and intend to add some additional
> FORMATOPTIONs to improve the setting of scale and
> resolution.  Hopefully the changes will make it into version
> 5.4 (release in first quarter of 2009?).
> 
> Brent Fraser
> 
> 
> José María Michia wrote:
> > Hi all.
> >I have worked several days, trying to get MapServer
> maps in vector format (PDF, SVG), to produce printed maps. I
> had intended to open the maps with Inkscape, to make the
> final composition with this program.
> > 
> > But I encounter many difficulties. Especially with:
> > 
> > - scale and resolution of the map
> > - scale of the symbols
> > - style of the symbols
> > - labels (angle = follow not work; incorrect alignment
> in SVG format)
> > 
> > As my maps are relatively small, and also need to move
> forward with my work, I have decided to use the PNG format
> (with the driver AGG).
> > 
> > Is a correct decision? Or instead, should it be
> possible to get maps in PDF / SVG as these maps are seen in
> picture format?
> > 
> > Sorry for my english.
> > Thanks for any advice.
> > José María
> > 
> > PS: Later I hope to continue working towards bringing
> the maps to Inkscape.
> > 
> > 
> >
> 
> > 
> > ___
> > 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


[mapserver-users] Re: PostGIS vs Shapefile [was: How to make MapServer WMS super fast?]

2008-12-13 Thread pcreso
Hi,

One quick comment, I haven't seen any suggestion of raster pyramids or having a 
few zoom layers of the rasters pre-built to improve mapserver performance. This 
is one area where performance can be significantly enhanced pretty easily.


And onto Maciej's question, I figure I perhaps should expand somewhat on what I 
meant... all based on my experiences with mapserver, shapefiles & Postgis to 
date...

Breaking a large shapefile up into spatial tiles will improve performance when 
zooming in as many of the tiles are not read, but when zoomed out, you have 
many shapefiles to process instead of just one. The fix for this is to use zoom 
(scale based) layers, with fewer large tiles of reduced precision data when 
zoomed out & many small high precision tiles when zoomed in. So much like zoom 
layers for rasters, you can build zoom layers for shapefiles. 

I believe this sort of optimisation can be managed more easily in Postgis, here 
are some examples I've used:

a lake "layer" comprising several mapserver layers as a zoom based group 
implemented on an underlying postgis table as something like:
  select lakes from t_lake where lake_area > 1000 for small scale/zoom out
  select lakes from t_lake where lake_area > 100  for med scale
  select lakes from t_lake where lake_area > 10   for lger scale zoomed in

Thus a single table provides several zoom layers. If you only have a few lakes 
& zoom layers, this can be done just about as fast with shapefiles, but when 
you have 100,000's of lakes, for example, the database can return a small 
subset (based on a well indexed query) to be rendered much faster than a 
shapefile can.



A bathymetry contour "layer" where the number & precision of the contours is 
modified depending on scale (to support a WFS service providing roughly 
constant data volumes irrespective of scale - still a work in progress), eg

  select simplify(the_geom, 1) from bathy_contours where depth in 
(select depth from contour_groups where scale=1000)
  select simplify(the_geom, 1000) from bathy_contours where depth in
(select depth from contour_groups where scale=100)
  select simplify(the_geom, 100) from bathy_contours where depth in
(select depth from contour_groups where scale=10)
  select the_geom from bathy_contours 
-- where scale < 5

The contour_groups table allows me to define which contours are plotted at each 
scale, so perhaps (250, 500, 1000, 2000, 5000) when zoomed out, or
(100, 250, 500, 750, 1000, 1500, 2000, 3000, 4000, 5000) as you zoom in
to all avaiable contours for large scale (zoomed in) maps. (I can even gain a 
few milliseconds by hard coding the depths in the sql instead of using the 
subquery if necessary :-)

The Postgis server queried by mapserver is not the one running mapserver & 
holding the rasyers in the application, but is a separate db server on a Gb 
LAN, thus distributing the load somewhat.

The underlying dataset was originally a 150Mb shapefile, which as a WFS XML 
file became about 2Gb of text, a bit excessive for WFS connections at 10mb. By 
using simplify() & reducing the numbers of contours, we are able to generate a 
reasonable map at any scale without significantly changing the volume of data 
transmitted.

The performsnce of the Postgis simplify() (Peuker-Douglas) function is 
exemplary, so that we have found no need to pre-build the point reduced layers, 
but can reduce the points dynamically as we need from a single high res dataset 
in a single table. The index on depth provides a high performance filter on 
which contour linestrings are processed. The spatial index quickly limits the 
contour segments to just those required for the extent required.


This use of database functionality to manage data volumes like this is much 
easier than with shape files, and I have not (yet) had performance issues due 
to Postgis, or at least none that couldn't be fixed prety easily with some 
database optimisation, such as clustered indexes, partitioned tables, custom 
fields with indexed flag values, etc. The resulting application (mapfile) was 
much simpler & I only have one database to manage, instead of a plethora of 
versions of shapefiles, which doesn't improve the application performance, but 
does improve mine :-)


Cheers,

  Brent Wood

--- On Sun, 12/14/08, Maciej Sieczka  wrote:

> From: Maciej Sieczka 
> Subject: PostGIS vs Shapefile [was: How to make MapServer WMS super fast?]
> To: pcr...@pcreso.com
> Cc: jukka.rahko...@mmmtike.fi, mapserver-users@lists.osgeo.org
> Date: Sunday, December 14, 2008, 2:31 AM
> pcr...@pcreso.com pisze:
> > Shapefiles seem to be faster when you want to plot
> most of or the
> > whole dataset, but if you want to select attribute or
> spatial based
> > subsets, they can be significantly faster on a well
> indexed Postgis
> > table.
> 
> Does this still hold true when appropriate tiling is done
> for
> Shapefiles, e.g. as described on [1]?
> 
> [1]http://www.nabble

RE : [mapserver-users] How to make MapServer WMS super fast?

2008-12-12 Thread pcreso
Hi,

Some general comments, not juat related to mapserver setup...

I think your peformance is likely to be more raster limited than vector, but 
apart from fast-cgi you might try using jpg's or png's with world files instead 
of geotiffs. Much smaller image file sizes (but two files to access) so less 
disk access time to retrieve them, but generally more cpu overhead to process 
them. I can't say which will result in overall faster performance, it depends 
on whether you are more I/O or cpu bound. 

Also, if you have large shapefiles, and are generally just rendering a small 
subset of them, you may find managing yor vector data in Postgis will be 
faster. Shapefiles seem to be faster when you want to plot most of or the whole 
dataset, but if you want to select attribute or spatial based subsets, they can 
be significantly faster on a well indexed Postgis table.

Also, depending on your system, you can abstract your Postgis database to a 
separate physical database server, whereas - barring network mounts - your 
shapefiles need to reside on the same server as your imagery (although having 
your rasters & shapefiles on different physical disks & filesystems on a single 
server can improve I/O performance as they can be read concurrently - assuming 
your SCSI controllers are up to the task).


Also, I have found Linux to be faster than Windows, quite significantly in some 
cases, although some opinions here differ :-) With Linux I find you can choose 
& tune your filesystem better, and 64bit Linux makes more effective use of 
large memory configurations (like 8-64Mb if you can get it). Adding memory to 
heavily loaded servers is one of the first ways to improve overall performance, 
if your OS can use it effectively. 


Cheers,

  Brent Wood

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


Re: [mapserver-users] Tracking vehicles, Displaying positions

2008-11-05 Thread pcreso
Hi Carmelo,

I am doing prettyt much this for vessel positions using PostGIS databases 
instead of MySQL. I believe PostGIS offers more mature & substantially better 
support for spatial objects at present, but you can probably achieve similar 
results with MySQL.

>From a data management and display perspective, I suggest you consider three 
>approaches depending on your needs:

1. Just display the GPS points of the required vehicles in the map.
2. Run a query to turn the required points into a linestring on the fly & 
display the line. 
3. Pre build vehicle tracklines according to business rules and display 
selected lines in the map.

All are relatively simple to do with PostGIS & Mapserver, and can be managed 
with MySQL, although I don't think as easily. (We use mostly option 3, and also 
option 2, opion 1 is a bit limited & can be somewhat slower to display)

You also haven't said whether you want web maps or hard copy maps. I'm assuming 
you are looking at web maps for now, & can print the result if required.

The other issue is that the map needs some background to give your data 
context. If necessary you can assemble local datasets of roads, 
aerial/satellite imagery, etc to overlay your data on. However I suggest you 
consider OpenLayers to provide the maps in your web application. This gives you 
easy access to Google & OpenStreetMaps & a range of public WMS/WFS data as a 
background without having to manage these data yourself.

Using Postgis to manage your spatial data, mapserver to provide it as a web 
service & OpenLayers as the client in your application, actually putting the 
various layers together to build your map is a very effective toolset for the 
sort of thing I think you are trying to achieve.

If you do need local vector data in addition to your GPS data, then I don't 
think CAD is the way to go, as suggested by other respondents, extracting these 
into GIS formats is going to work better for you in this arena.

HTH,

   Brent Wood


--- On Wed, 11/5/08, Carmelo Saffioti <[EMAIL PROTECTED]> wrote:

> From: Carmelo Saffioti <[EMAIL PROTECTED]>
> Subject: Re: [mapserver-users] Tracking vehicles, Displaying positions
> To: "Venkat Rao Tammineni" <[EMAIL PROTECTED]>, 
> mapserver-users@lists.osgeo.org
> Date: Wednesday, November 5, 2008, 11:39 PM
> Thank you Venkat for your reply,
> it's interesting to know that it's possible to
> access coordinates data
> directly from the MySql db...
> but before displaying points on the map, I need to
> understand how can I
> "create" a map from my planimetry DWG cad file...
> 
> I hope you can help me
> Cheers
> Carmelo
> 
> 
> Hi,
> 
>1)There are different ways to place GPS points on map.
>  a)  You can display points using OGR direct
> connection, Please refer
> below url
>
> http://mapserver.gis.umn.edu/docs/howto/ogrmysql/?searchterm=ovf
> 
> http://mapserver.gis.umn.edu/docs/howto/debian-odbc-mysql/?searchterm=ovf
> 
> http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialData/?searchterm=ovf
> 
> 2)And You can not create DWG file by using mapfile.Mapfile
> will give you
> image format.
> Please have a look below url.
> 
>  
> http://mapserver.gis.umn.edu/docs/reference/vector_data/format_types
> 
> I hope this helps you.
> 
> Thanks,
> Venkat
> 
> 
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Carmelo
> Saffioti
> Sent: Wednesday, November 05, 2008 2:30 PM
> To: mapserver-users@lists.osgeo.org
> Subject: [mapserver-users] Tracking vehicles, Displaying
> positions
> 
> Hi everybody,
> I need to develop a system for tracking and displaying
> vehicles
> positions. I'm storing NMEA gps sentences into a MySql
> DB. Now I'd
> like to display these positions on a map. How can I do?
> I'm new to
> this, can you give me any suggestion?
> I have to create the map too, because this zone is not
> mapped. Is it
> possible to create a map from a DWG cad file?
> 
> I hope you can help me
> Cheers
> Carmelo
> 
> ___
> 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] Ed's Rules for the Best Raster Performance

2008-09-16 Thread pcreso
Hmmm the discussion here has only looked at jpgs & geotiffs.

I tend to use PNG format, which I believe is less lossy than jpgs, & supports 
transparency, which has worked fine for small scale implementations.

Can any experts here comment on the pros/cons of png vs jpg?


Thanks,

  Brent Wood



--- On Wed, 9/17/08, Ed McNierney <[EMAIL PROTECTED]> wrote:

> From: Ed McNierney <[EMAIL PROTECTED]>
> Subject: Re: [mapserver-users] Ed's Rules for the Best Raster Performance
> To: "Jeff Hoffmann" <[EMAIL PROTECTED]>
> Cc: "Jim Klassen" <[EMAIL PROTECTED]>, "mapserver-users@lists.osgeo.org" 
> 
> Date: Wednesday, September 17, 2008, 3:45 AM
> Jeff -
> 
> I'm not convinced, either, but I have never seen a
> real-world test that has shown otherwise.  There haven't
> been many such tests, but I have done them myself and
> several others have done them as well and posted the results
> on this list.  There may be tradeoffs which require a
> different implementation - that's life in the real world
> - but the data (the real, measured data, not theoretical
> speculation) has always been consistent.
> 
> If you want to shrink the file size in this thought
> experiment that's fine, but realize that you are thereby
> increasing the number of files that need to be opened for a
> random image request.  And each new open file incurs a
> relatively high cost (directory/disk seek overhead, etc.);
> those thousands or millions of JPEGs aren't just hard to
> keep track of - they hurt performance.  I have been the
> keeper of tens of millions of such files, and have seen some
> of those issues myself.
> 
> The example I gave (and my other examples) are, however,
> primarily intended to help people think about all the
> aspects of the problem.  File access performance in an
> application environment is a complex issue with many
> variables and any implementation should be prototyped and
> tested.  All I really care about is that you don't think
> it's simple and you try to think through all the
> consequences of an implementation plan.
> 
> I will also admit to being very guilty of not designing for
> "low-moderate load" situations, as I always like
> my Web sites to be able to survive the situation in which
> they accidentally turn out to be popular!
> 
> - Ed
> 
> 
> On 9/16/08 11:21 AM, "Jeff Hoffmann"
> <[EMAIL PROTECTED]> wrote:
> 
> Ed McNierney wrote:
> >
> > And remember that not all formats are created equal.
> In order to
> > decompress ANY portion of a JPEG image, you must read
> the WHOLE file.
> > If I have a 4,000x4,000 pixel 24-bit TIFF image
> that's 48 megabytes,
> > and I want to read a 256x256 piece of it, I may only
> need to read one
> > megabyte or less of that file. But if I convert it to
> a JPEG and
> > compress it to only 10% of the TIFF's size,
> I'll have a 4.8 megabyte
> > JPEG but I will need to read the whole 4.8 megabytes
> (and expand it
> > into that RAM you're trying to conserve) in order
> to get that 256x256
> > piece!
> I have a feeling like I'm throwing myself into a
> religious war, but here
> goes. I think the problem that you have in your estimates
> is that you're
> using large (well, sort of large) jpegs. When you're
> using properly
> sized jpegs on modern servers at low-moderate load, you can
> pretty much
> disregard the processor time and memory issues, and just
> compare on the
> basis of the slowest component, disk access. 4000x4000 is
> big & the
> performance isn't going to be good (for the reasons you
> mention), but he
> never claimed to be using images that big. What he claimed
> is that he's
> using 1000x1000 jpegs. The 1000x1000 jpegs is pretty
> critical because
> it's that sweet spot where the decompress time is
> small, the memory
> demands manageable but the images are large enough that you
> keep the
> number of tiles down to a minimum for most uses. Those
> jpegs might be in
> the 200k size range, compared to a 256x256 block = 64k (x3
> bands =192k?)
> so he's reading a full 1000x1000 image in the disk
> space of 1 256x256
> block. If you're serving up 500x500 finished image,
> you're using at
> least 4 blocks in the geotiff, maybe 9 compared 1-4 with
> the 1000x1000
> jpeg. You could easily be spending 2x the time reading the
> disk with
> geotiff as you would be with jpegs. I haven't sat down
> and done any side
> by side tests, but I can see how they would be competitive
> for certain
> uses when you look at it that way. Of course there are
> other issues like
> lossy compression on top of lossy compression, plus
> you've got to worry
> about keeping track of thousands (millions?) of jpegs, but
> they're
> probably manageable tradeoffs. Oh, and you don't really
> get the option
> to have nodata areas with jpegs, either. There's
> probably other
> drawbacks, too, but I'm not convinced that performance
> is one of them.
> 
> jeff
> 
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://li

Re: [mapserver-users] How to improve raster imagery display ?

2008-09-13 Thread pcreso
Hi Rainer,

Firstly, are you using FastCGI? If not, implementing this may help. I assume 
you have indexes to all the raster images.

I'd also consider an architectural approach, where you abstract the raster data 
to a custom built system & access this via WMS. We have improved performance of 
such systems by having mapfiles access data from PostGIS databases on disparate 
servers rather than one congested system.

Similarly, for rasters, you may also be able to use hardware rather than 
software to address your performance issues by splitting your raster files up 
between servers, effectively a further level of tiling. With caching (as 
below), multiple users hitting the same region should generally hit the cache, 
and users hitting multiple regions will have their load spread across different 
servers. 

Look at http://geowebcache.org/
While it possibly integrates better with GeoServer than mapserver, it will 
supposedly work with any WMS server.

Given the cheap price of hardware & memory/cpu performance these days, adding a 
couple of multi-core boxes with a few GB of memory & a Tb drive or two each 
isn't a huge outlay, & Gb LAN is also cheap.



I guess when your programming skills are as bad as mine, you look at other 
solutions first :-)

I'm interested in hearing about your project, we are in the process of 
accumulating around 11Tb of aerial imagery & will be looking at ways to provide 
access to this.


Cheers,

  Brent Wood


--- On Sun, 9/14/08, Rainer Kalliany <[EMAIL PROTECTED]> wrote:

> From: Rainer Kalliany <[EMAIL PROTECTED]>
> Subject: [mapserver-users] How to improve raster imagery display ?
> To: mapserver-users@lists.osgeo.org
> Date: Sunday, September 14, 2008, 11:24 AM
> Dear all,
> 
> Yet for some months, my wife (who is the far more
> experienced programmer,
> and me (rather responsible for
> collecting/re-formatting/providing data)
> are developing a MapServer-based webGIS. Your community
> already has
> helped us several times a lot with your experience, and we
> are most
> grateful for that great support.
> 
> Now, with our project almost finished, the so far pretty
> poor performance
> in displaying raster images (aerial orthophotos at a ground
> resolution of
> 0.25 metres) is becoming a critical issue. In particular
> when several
> users want to work at the same time, what happened last
> week :-(
> 
> So far we had our orthophotos organized in a seamless grid
> of ECW-images,
> 1 by 1 pixel each (corresponding to 2500 by 2500
> metres on ground).
> 
>  From that dataset our MapServer produces the
> "orthophoto" layer on demand,
> at scales of 1 by 1000, 2000, 5000 or 1. With the
> standard settings
> of 72 dpI, that renders pixels of 0.353, 0.706, 1.764 or
> 3.528 metres.
> 
> I am well aware that at least for the 1 scale I should
> introduce
> a layer with reduced resolution. I already have prepared
> such a dataset.
> 
> But our main concern are the scales 2000 and 1000, where
> the displaying
> process is producing many dozens of tiles, each 256 x 256
> pixel .png-files.
> Along with the other layers (where the vector-data also are
> displayed by
> rasterized tiles which at least are much smaller), the
> composition of one
> screen sometimes takes up to 3 minutes !
> 
> NOW MY IDEA is to produce all those .PNGs (with their weird
> directory
> structure and naming, like
> \t-86016\l3072\t-84992l4352.png, which how-
> ever I already have understood) in advance and myself. For
> the conversion
> from ECW to PNG I might use GDAL, but without any
> resampling necessary.
> 
> I also consider raising tilewidth/tileheight from the
> standard value 256
> to 512 or even 1024 pixels.
> 
> Now my question is, if that is a good idea or not.
> 
> If you disagree with me: Do you have some alternative
> proposal ?
> 
> If you think my planned approach basically is a good one,
> do you have
> any supporting advices, on issues I possibly did not
> consider ?
> 
> THis is becoming a dcisive isuue for the success of our
> whole project,
> and therefore we will be most grateful for any hint !
> 
> With kind regards,
> 
> Rainer & Susanne Kalliany
> 
> 2008-09-13, 23:25 UTC
> -- 
> DI. Rainer Kalliany - [EMAIL PROTECTED]
> 
> TeFiS - www.tefis.at
> Technische und forstliche Informationssysteme (Forstliche
> Software, GIS)
> KALLIANY - www.kalliany.at
> Ingenieurbüro für Vermessungswesen (Photogrammetrie,
> Fernerkundung, GPS)
> 
> Mobiltelephon: +43 664 1811098
> Telephon: +43 316 931746-0, Fax: -15
> 
> A-8010 Graz, Schillerstrasse 58
> A-1040 Wien, Schaumburgergasse 11/13
> AUSTRIA
> ___
> 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 + Database + WFS

2008-08-04 Thread pcreso
Hi all,

One approach I'm looking at to manage this is setting up scale dependent zoom 
layers. Zoomed out, only a significant subset of features, simplified to reduce 
the vertex count, progressively adding features & reducing the simplify 
corridor as the map zooms in, to try & send a roughly constant volume of data 
to the client irrespective of scale. 

The text version of a vertex list is pretty long, often hundreds of kb for a 
feature, so reducing the no of vertices & features should make a big difference.

I'm also looking at reducing the number of significant digits used to store 
each vertex, given each digit becomes 1 byte in XML, as the values often 
provide a far higher precision than is necessary (but I'm not too sure how to 
do this yet :-)


All this is in the pretty early stages of trialling, so any comments or advice 
appreciated.


Cheers,

  Brent Wood 


--- On Tue, 8/5/08, Léveillé, James <[EMAIL PROTECTED]> wrote:

> From: Léveillé, James <[EMAIL PROTECTED]>
> Subject: RE : RE : [mapserver-users] MapServer + Database + WFS
> To: "Nolte, Tim" <[EMAIL PROTECTED]>, mapserver-users@lists.osgeo.org
> Date: Tuesday, August 5, 2008, 6:39 AM
> Hi Tim,
> 
> I had the same problem - even a few "timeouts" on
> the server side (I know,
> with IIS ...).
> 
> >From my experience, WFS worked fine with a few
> features, but it proved to be
> "more difficult" to use when there were to many
> of them due 1) to the size
> of the GML file returned and 2) to the time it takes to
> read all the
> information from Oracle.
> 
> I found no solution to this problem ...
> 
> 
> 
> __
> JAMES LÉVEILLÉ
> Service des systèmes de Mission
> Direction des technologies de l'information
> Ministère des Transports du Québec
> 5833, boul. Pierre-Bertrand, 2ième étage
> Québec (Québec) G2K 1K7
> Téléphone:   (418) 380-2005 poste 227
> Télécopieur: (418) 644-6653
> [EMAIL PROTECTED]
> 
>  
> 
> 
> -Message d'origine-
> De : Nolte, Tim [mailto:[EMAIL PROTECTED] 
> Envoyé : 4 août 2008 14:23
> À : Léveillé, James; mapserver-users@lists.osgeo.org
> Objet : RE: RE : [mapserver-users] MapServer + Database +
> WFS
> 
> 
> James,
> 
> Thanks for the info. After a bunch of trial and error I was
> able to finally
> able to get WFS working, and our WFS client actually having
> the objects. One
> problem that I did run into was with the size of the data.
> I had around 1800
> or so features each with around 15 attributes of data. This
> proved to take
> like 20 minutes for the entire amount of data to load.
> I'm not sure if you
> have any suggestions with that one. The only thing I found
> was to break up
> the data into smaller chunks, while not the most ideal
> solution it at least
> helped to reduce some of the load time feel.
> 
> - Tim
> 
> 
> Timothy J Nolte - [EMAIL PROTECTED]
> Network Planning Engineer
> 
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
> 
> Office: 616-656-5163
> PCS:616-706-2438
> Fax:616-554-6484
> Web: www.ipcswirelessinc.com 
> 
> > -Original Message-
> > From: Léveillé, James
> [mailto:[EMAIL PROTECTED]
> > Sent: Monday, August 04, 2008 2:08 PM
> > To: Nolte, Tim; mapserver-users@lists.osgeo.org
> > Subject: RE : [mapserver-users] MapServer + Database +
> WFS
> > 
> > Hi Tim,
> > 
> > If it's not too late (I'm coming back from
> vacation), here is a 
> > working example with MapServer 5 (on Windows) and
> Oracle 10g.
> > I'm also using a custom projection.
> > 
> > Hope it helps.
> > 
> > 
> > ---
> > MAP
> > 
> >   NAME  "Prototype"
> >   CONFIG PROJ_LIB  
> "D:/mapserver5_orcl/ms4w/proj/nad"
> > 
> >   PROJECTION
> > "init=epsg:42105"
> >   END
> >   WEB
> > METADATA
> >   "wfs_title"  
> "Prototype"
> >   "wfs_onlineresource"
> >
> "http://server_name/MapServer5_orcl/mapserv.exe?map=D:\project
> > \my_wfs_mapfil
> > e.map"
> >   "wfs_srs"
> "EPSG:42105" # *** 
> > Contrary to WMS,
> > I think that the OGC WFS specification doesn't
> allow a layer
> > (feature type)
> > to be advertized in more than one SRS.
> >   "wfs_abstract"   
> "My prototype ..."
> >   "wfs_geometry_element_name"  
> "MS_GEOMETRY"
> > END
> >   END
> >   STATUS  ON
> > 
> >   EXTENT  3 75000 171 212
> # 
> > Custom projection
> > #  SHAPEPATH  
> "D:/systemes/dds/donnees/"
> >   UNITS   METERS
> > 
> > # MY LAYER
> > 
> >   LAYER
> > 
> > NAME  "layer
> name"
> > PROJECTION
> >   "init=EPSG:42105" # Custom projection
> > END
> > METADATA
> >   "wfs_title"
> "Layer Name"
> >   "wfs_name" 
> "Layer Name"
> >   "wfs_abstract" 
> "Layer Name"
> >   "wfs_srs"  
> "EPSG:42105" # Custom projection
> > 
> >   "wfs_geo

Re: [mapserver-users] MapServer Open Suse 10.2

2008-07-01 Thread pcreso
--- On Wed, 7/2/08, Juan Jose Del Toro Madrueño <[EMAIL PROTECTED]> wrote:


> To: mapserver-users@lists.osgeo.org
> Date: Wednesday, July 2, 2008, 2:40 AM
> Dear List;
> 
> Has anyone had major issues while implementing mapserver in
> open suse 10.2

Hi Juan,

Nope. Works reliably & installs easily. I had been installing (& building) from 
source since v9, along with QGIS, GDAL, GEOS, PostGIS, Proj4, but for the 
last year or so I've been adding the Opensuse GEO repository to YAST & 
installing it all from there as required.

http://download.opensuse.org/repositories/Application:/Geo/...

Of course, if you want a custom mapserver compilation with specific 
capabilities, this may not meet your needs.

Cheers,

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


Re: [mapserver-users] Basic Projection Help

2008-06-27 Thread pcreso
Hi Matthew,

If you loaded it from shapefiles using shp2pgsql, then use the -s flag to set 
the srid to the correct value.

If you \d your table, I think you'll find a constraint on it setting the srid, 
as well as the geometrycolumns entry.

The simplest way to get things working with mapserver may well be to leave it 
as -1 in the database (& geometrycolumns entry) & in your mapserver mapfile 
data statement, specify the sql returns setsrid(geom,26915) instead of geom, so 
postgis returns the values with the appropriate SRID set, irrespective of what 
the database actually stores.

That will get things working until you load the data with the correct srid.

HTH,

  Brent Wood



--- On Sat, 6/28/08, Matthew Pettis <[EMAIL PROTECTED]> wrote:

> From: Matthew Pettis <[EMAIL PROTECTED]>
> Subject: [mapserver-users] Basic Projection Help
> To: "Mapserver-users" 
> Date: Saturday, June 28, 2008, 5:47 PM
> Hello,
> 
> I'm trying to get a handle on projections and
> reprojections.  I have a
> dataset in a postgis database table that is in epsg:26915
> (it's the state of
> MN).  I know this from the metadata provided by the
> provider (state of
> Minnesota itself).
> 
> When I loaded it into postgis, the geometry_columns row for
> this
> table/column combo set srid=-1.  As I know that this is in
> epsg:26915, I
> manually changed the geometry_columns row entry to it (see:
> ===
> geometry_columns === section).
> 
> Problem is, I get an error of using two different
> geometries.  Anybody have
> any idea how i set the srid to the correct value of
> epsg:26915?  I'd like to
> set this correctly so I can reproject it as necessary.  The
> map will render
> with srid=-1, but then I don't think I can reproject
> the image correctly,
> right?
> 
> below are what I think are the important sections to this
> problem.  Thanks
> in advance for your help.
> 
> Matt
> 
> === url ===
> ==
> http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\Apache\htdocs\ol\mapreproj.map&mode=map
> ==
> 
> === error message ===
> ==
> msDrawMap(): Image handling error. Failed to draw layer
> named 'state'.
> msPOSTGISLayerWhichShapes(): Query error. Error executing
> POSTGIS SQL
> statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR
> FOR SELECT
> asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text
> from
> shp_state WHERE the_geom &&
> setSRID('BOX3D(141095.125 4809728.25,810342.625
> 5478975.75)'::BOX3D,
> find_srid('','shp_state','the_geom')
> ) -ERROR:
> Operation on two geometries with different SRIDs
> ==
> 
> === geometry_columns ===
> ==
> oid;f_table_catalog;f_table_schema;f_table_name;f_geometry_column;coor_dimension;srid;type
> 336791;"''";"public";"shp_state";"the_geom";2;26915;"MULTIPOLYGON"
> ==
> 
> === mapreproj.map ===
> ==
> MAP
> 
> 
> # Map attributes
> 
>   IMAGETYPE   PNG
>   EXTENT  184056.505 4809728.25 767381.245 5478975.75
>   SIZE600 600
>   IMAGECOLOR  255 255 255
>   FONTSET
> "C:/ms4w/Apache/htdocs/fonts/fonts.list"
> 
> 
> # Web settings
> 
>   WEB
> IMAGEPATH   "C:/ms4w/Apache/htdocs/tmp/"
> IMAGEURL"/tmp/"
>   END
> 
> 
> # State
> # Background shows through missing precincts to show
> where no votes will
> be coming from
> 
>   LAYER
> NAME  "state"
> 
> CONNECTIONTYPEpostgis
> CONNECTION"user=postgres dbname=gisvote
> password=postgres"
> DATA  "the_geom from shp_state"
> STATUSdefault
> TYPE  polygon
> 
> CLASS
>   NAME"state"
>   COLOR   200 200 200
> END
> 
>   END # Layer state
> 
> END
> ==
> 
> 
> -- 
> It is from the wellspring of our despair and the places
> that we are broken
> that we come to repair the world.
> -- Murray
> Waas___
> 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] mapserver/postgis/WFS help

2008-06-24 Thread pcreso
Hi,

I'm looking at using mapserver as a WFS server as well as WMS. We don't need 
WFS-T (yet) & the mapserver implementation seems fine for our needs.

I've been asked to serve a 160Mb shape file (over a 10mb link at best - yes, I 
know but there are good reasons)

To make this more workable, performance wise, I can load the shapefile into 
PostGIS & use a spatial index, as well as set up a group in the mapfile with 
scale/zoom dependent layers, selecting mixtures of data subsets & simplified 
line features as appropriate.

I'm reasonably familiar with this for WMS, but it's my first foray into WFS.


I see in the OGC WFS spec there is the option to pass coords for upper/lower 
corners in the GetFeatures request, which suggests setting extents is possible, 
I guess it is up to the client implementation (ESRI in this case) to actually 
use this capability.

So, a couple of questions (assuming the WFS request includes the upper/lower 
corners - map extent ):


For WFS layers, will mapserver utilise the spatial index to select/send only 
features within the current map extent? 

Is the zoom/scale used to turn layers off/on (so the user can select one group 
& the mapfile will determine which "version" of the data gets sent)
applied to WFS requests as it is for CGI & WMS requests? 


Thanks,

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


Re: [mapserver-users] using vector data format

2008-06-18 Thread pcreso

Valerio,

These guys have some cheapish (non OS) Windows based tools for working with dwg 
files, including their CAD converter which may do what you need.

http://www.dwgtool.com/


HTH,

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