Re: [mapserver-users] PHP mapscript $shape-buffer() takes a long time

2009-11-18 Thread Ludwig Kniprath
We had the same problem. In deed the buffer-algorithm is very expensive, 
especially with large polygons and a large buffer-radius. If you use Postgis, 
you can simplify the Polygon with ST_Simplify or ST_SimplifyPreserveTopology in 
dependency from scale and buffer-radius, this will make the buffer-process much 
faster without significant loss of quality. You can do this on runtime on your 
original data with dynamic PostGIS-queries. If you don't use PostGis, you have 
to create simplified layers.

Pseudo-PHP-PostGIS-SQL:
SELECT ... 
ST_SetSRID(ST_BUFFER(ST_SIMPLIFY($geometery_field,$simplify_tolerance),$buffer_radius,
 $number_of_segments),$srid)::geometry ...FROM...

And don't use the buffered polygon for geo-queries, there are faster ways in 
PostGIS and Mapserver.

Regards
Ludwig Kniprath 


I'm trying to buffer a shape returned from a point query on a polygon layer
of parcels.

 

When I try to use:

 

$bufferedShape = $shape-buffer(200);

 

I get back a fatal error: Maximum execution time of 30 seconds exceeded.

I know that this is a php error message and that I could increase the
allowable execution time.

 

If I use a buffer distance of 175 I get results.

 

Should it take such a long time to but a buffer around this parcel?  It is a
large parcel with one corner being a long curve like a quarter of a circle
and another section on one side being a half circle.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] fatal error on linux server

2009-11-18 Thread francesco
Should check your mapfile if it is correctly parsed by the mapscritpt. 
Try drawing the mapfile using standard mapserver.exe and see if it works.

Francesco Pirotti

MSulchan Darmawan ha scritto:

Dear all,

I've made a PHP script and tried it on windows using ms4w (mapserver
5.4.2) and it's completely works.
Then I tried it on linux (ubuntu server 8.04 with mapserver 5.4.2) but
it produce the following error :

Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
'aceh'.
in /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
on line 184

Warning: [MapServer Error]: msShapefileOpen(): (KB_ACEH.shp)
in /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
on line 184

Warning: [MapServer Error]: msShapefileOpen():
(/home/bleketux/public_html/cmh2/mapserver/shp/KB_ACEH.shp)
in /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
on line 184

Fatal error: Call to a member function SaveWebImage() on a non-object
in /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
on line 185

Here is some script of line 180 - 185 :

$strProj = proj=latlong,ellps=WGS84,datum=WGS84;
$objMap-SetProjection ($strProj, MS_FALSE);
$objMap-outputformat-Set (name, Format GIF);
$objMap-outputformat-Set (extension, gif);
$objImagePeta = $objMap-Draw();
$objUrlPeta = $objImagePeta-SaveWebImage();

To avoid permission problem, i've set chmod 777 to the root web folder.
Can you point me where should I fix the problem ?
Thanks in advance.

  



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



--
*Francesco Pirotti*
Dep. TESAF
CIRGEO – Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: francesco.piro...@unipd.it mailto:francesco.piro...@unipd.it
Phone: +39 049 827 2710
Phone: +39 349 55 39 261


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


[mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Jelmer Baas
Hello list,

I'm trying to get MapServer running as a WFS server with an Oracle data
source. When using TAB files I have no problem, also using the Oracle
datasource and letting MapServer draw it (WMS) works properly.

However, the WFS request only returns one result (a correct one). My
total resulting XML is:
wfs:FeatureCollection xsi:schemaLocation=http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://x.x.x/scripts/mapserv.exe?map=address.mapSERVICE=WFSVERSION=1.0
.0REQUEST=DescribeFeatureTypeTYPENAME=addressOUTPUTFORMAT=XMLSCHEMA
gml:boundedBy
gml:Box srsName=EPSG:4326
gml:coordinates5.172200,52.038485 5.173701,52.038853/gml:coordinates
/gml:Box
/gml:boundedBy
/wfs:FeatureCollection

There should be more results (confirmed by the WMS image and by
monitoring the query in Oracle). I also set DUMP to true and
gml_include_items all in my layer METADATA, so I also expected more
fields. My layer definition is as follows:

LAYER
NAME address
TYPE point
CONNECTIONTYPE oraclespatial
DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
CONNECTION x/y...@z
DUMP TRUE
PROCESSING CLOSE_CONNECTION=DEFER
CLASS
SYMBOL circle
OUTLINECOLOR 255 0 0
SIZE 6
NAME address
END
PROJECTION
init=epsg:28992
END
METADATA
wfs_title address
wfs_srs EPSG:28992 EPSG:900913
wms_title address
wms_srs EPSG:28992 EPSG:900913
gml_featureid ID
gml_include_items all
END
END

Any idea what I'm doing wrong? I'm using MapServer 5.4.2 with Oracle
10g.

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


Re: [mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Rahkonen Jukka
Hi,

You seem not to get even a single feature back, all you get is an empty 
bounding box. How does you GetFeature request look like?

-Jukka Rahkonen-



 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Jelmer Baas
 Lähetetty: 18. marraskuuta 2009 12:11
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] MapServer, WFS and Oracle
 
 Hello list,
 
 I'm trying to get MapServer running as a WFS server with an 
 Oracle data source. When using TAB files I have no problem, 
 also using the Oracle datasource and letting MapServer draw 
 it (WMS) works properly.
 
 However, the WFS request only returns one result (a correct 
 one). My total resulting XML is:
 wfs:FeatureCollection xsi:schemaLocation=http://www.opengis.net/wfs
 http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
 http://mapserver.gis.umn.edu/mapserver
 http://x.x.x/scripts/mapserv.exe?map=address.mapSERVICE=WFSV
 ERSION=1.0
 .0REQUEST=DescribeFeatureTypeTYPENAME=addressOUTPUTFORMAT=X
 MLSCHEMA
 gml:boundedBy
 gml:Box srsName=EPSG:4326
 gml:coordinates5.172200,52.038485 
 5.173701,52.038853/gml:coordinates
 /gml:Box
 /gml:boundedBy
 /wfs:FeatureCollection
 
 There should be more results (confirmed by the WMS image and 
 by monitoring the query in Oracle). I also set DUMP to true 
 and gml_include_items all in my layer METADATA, so I also 
 expected more fields. My layer definition is as follows:
 
   LAYER
   NAME address
   TYPE point
   CONNECTIONTYPE oraclespatial
   DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
   CONNECTION x/y...@z
   DUMP TRUE
   PROCESSING CLOSE_CONNECTION=DEFER
   CLASS
   SYMBOL circle
   OUTLINECOLOR 255 0 0
   SIZE 6
   NAME address
   END
   PROJECTION
   init=epsg:28992
   END
   METADATA
   wfs_title address
   wfs_srs EPSG:28992 EPSG:900913
   wms_title address
   wms_srs EPSG:28992 EPSG:900913
   gml_featureid ID
   gml_include_items all
   END
   END
 
 Any idea what I'm doing wrong? I'm using MapServer 5.4.2 with 
 Oracle 10g.
 
 Regards,
 Jelmer Baas
 ___
 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, WFS and Oracle

2009-11-18 Thread Jelmer Baas
Jukka,

Thanks for the quick reply. The request is:

mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureSRS=EPSG%3A4326BBOX=1.171946062917749,52.038473357169345,5.173921509856943,52.03887593415947

(Very zoomed out)

If this is another projection issue, I'm going to eat my shoe. ;)

Regards,
Jelmer

 -Original Message-
 From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
 Sent: woensdag 18 november 2009 11:51
 To: Jelmer Baas; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapServer, WFS and Oracle
 
 Hi,
 
 You seem not to get even a single feature back, all you get 
 is an empty bounding box. How does you GetFeature request look like?
 
 -Jukka Rahkonen-
 
 
 
  -Alkuperäinen viesti-
  Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
  [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Jelmer Baas
  Lähetetty: 18. marraskuuta 2009 12:11
  Vastaanottaja: mapserver-users@lists.osgeo.org
  Aihe: [mapserver-users] MapServer, WFS and Oracle
  
  Hello list,
  
  I'm trying to get MapServer running as a WFS server with an 
  Oracle data source. When using TAB files I have no problem, 
  also using the Oracle datasource and letting MapServer draw 
  it (WMS) works properly.
  
  However, the WFS request only returns one result (a correct 
  one). My total resulting XML is:
  wfs:FeatureCollection 
 xsi:schemaLocation=http://www.opengis.net/wfs
  http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
  http://mapserver.gis.umn.edu/mapserver
  http://x.x.x/scripts/mapserv.exe?map=address.mapSERVICE=WFSV
  ERSION=1.0
  .0REQUEST=DescribeFeatureTypeTYPENAME=addressOUTPUTFORMAT=X
  MLSCHEMA
  gml:boundedBy
  gml:Box srsName=EPSG:4326
  gml:coordinates5.172200,52.038485 
  5.173701,52.038853/gml:coordinates
  /gml:Box
  /gml:boundedBy
  /wfs:FeatureCollection
  
  There should be more results (confirmed by the WMS image and 
  by monitoring the query in Oracle). I also set DUMP to true 
  and gml_include_items all in my layer METADATA, so I also 
  expected more fields. My layer definition is as follows:
  
  LAYER
  NAME address
  TYPE point
  CONNECTIONTYPE oraclespatial
  DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
  CONNECTION x/y...@z
  DUMP TRUE
  PROCESSING CLOSE_CONNECTION=DEFER
  CLASS
  SYMBOL circle
  OUTLINECOLOR 255 0 0
  SIZE 6
  NAME address
  END
  PROJECTION
  init=epsg:28992
  END
  METADATA
  wfs_title address
  wfs_srs EPSG:28992 EPSG:900913
  wms_title address
  wms_srs EPSG:28992 EPSG:900913
  gml_featureid ID
  gml_include_items all
  END
  END
  
  Any idea what I'm doing wrong? I'm using MapServer 5.4.2 with 
  Oracle 10g.
  
  Regards,
  Jelmer Baas
  ___
  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, WFS and Oracle

2009-11-18 Thread Bart van den Eijnden
WFS 1.0 does not support reprojection AFAIK. At least the OGC spec does not, 
don't know if Mapserver implemented it vendor-specific like Geoserver did, but 
I could be wrong.

Try version 1.1.0.

Best regards,
Bart

On Nov 18, 2009, at 12:05 PM, Jelmer Baas wrote:

 Jukka,
 
 Thanks for the quick reply. The request is:
 
 mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureSRS=EPSG%3A4326BBOX=1.171946062917749,52.038473357169345,5.173921509856943,52.03887593415947
 
 (Very zoomed out)
 
 If this is another projection issue, I'm going to eat my shoe. ;)
 
 Regards,
 Jelmer
 
 -Original Message-
 From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
 Sent: woensdag 18 november 2009 11:51
 To: Jelmer Baas; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapServer, WFS and Oracle
 
 Hi,
 
 You seem not to get even a single feature back, all you get 
 is an empty bounding box. How does you GetFeature request look like?
 
 -Jukka Rahkonen-
 
 
 
 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Jelmer Baas
 Lähetetty: 18. marraskuuta 2009 12:11
 Vastaanottaja: mapserver-users@lists.osgeo.org
 Aihe: [mapserver-users] MapServer, WFS and Oracle
 
 Hello list,
 
 I'm trying to get MapServer running as a WFS server with an 
 Oracle data source. When using TAB files I have no problem, 
 also using the Oracle datasource and letting MapServer draw 
 it (WMS) works properly.
 
 However, the WFS request only returns one result (a correct 
 one). My total resulting XML is:
 wfs:FeatureCollection 
 xsi:schemaLocation=http://www.opengis.net/wfs
 http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
 http://mapserver.gis.umn.edu/mapserver
 http://x.x.x/scripts/mapserv.exe?map=address.mapSERVICE=WFSV
 ERSION=1.0
 .0REQUEST=DescribeFeatureTypeTYPENAME=addressOUTPUTFORMAT=X
 MLSCHEMA
 gml:boundedBy
 gml:Box srsName=EPSG:4326
 gml:coordinates5.172200,52.038485 
 5.173701,52.038853/gml:coordinates
 /gml:Box
 /gml:boundedBy
 /wfs:FeatureCollection
 
 There should be more results (confirmed by the WMS image and 
 by monitoring the query in Oracle). I also set DUMP to true 
 and gml_include_items all in my layer METADATA, so I also 
 expected more fields. My layer definition is as follows:
 
 LAYER
 NAME address
 TYPE point
 CONNECTIONTYPE oraclespatial
 DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
 CONNECTION x/y...@z
 DUMP TRUE
 PROCESSING CLOSE_CONNECTION=DEFER
 CLASS
 SYMBOL circle
 OUTLINECOLOR 255 0 0
 SIZE 6
 NAME address
 END
 PROJECTION
 init=epsg:28992
 END
 METADATA
 wfs_title address
 wfs_srs EPSG:28992 EPSG:900913
 wms_title address
 wms_srs EPSG:28992 EPSG:900913
 gml_featureid ID
 gml_include_items all
 END
 END
 
 Any idea what I'm doing wrong? I'm using MapServer 5.4.2 with 
 Oracle 10g.
 
 Regards,
 Jelmer Baas
 ___
 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] MapServer, WFS and Oracle

2009-11-18 Thread Rahkonen Jukka
Hi,

I hope you have tasty shoes.  WFS 1.0.0 does officially support only one 
projection. I am not sure how Marverver has implemented it, with Geoserver it 
is possible to use also other projections by adding projection parameter to 
request.  However, I would try GetFeature request by using BBOX in native 
projection.

-Jukka Rahkonen-

 -Alkuperäinen viesti-
 Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Jelmer Baas
 Lähetetty: 18. marraskuuta 2009 13:06
 Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
 Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
 
 Jukka,
 
 Thanks for the quick reply. The request is:
 
 mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
 ON=1.0.0REQUEST=GetFeatureSRS=EPSG%3A4326BBOX=1.17194606291
7749,52.038473357169345,5.173921509856943,52.03887593415947
 
 (Very zoomed out)
 
 If this is another projection issue, I'm going to eat my shoe. ;)
 
 Regards,
 Jelmer
 
  -Original Message-
  From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
  Sent: woensdag 18 november 2009 11:51
  To: Jelmer Baas; mapserver-users@lists.osgeo.org
  Subject: Re: [mapserver-users] MapServer, WFS and Oracle
  
  Hi,
  
  You seem not to get even a single feature back, all you get is an 
  empty bounding box. How does you GetFeature request look like?
  
  -Jukka Rahkonen-
  
  
  
   -Alkuperäinen viesti-
   Lähettäjä: mapserver-users-boun...@lists.osgeo.org
   [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
  Jelmer Baas
   Lähetetty: 18. marraskuuta 2009 12:11
   Vastaanottaja: mapserver-users@lists.osgeo.org
   Aihe: [mapserver-users] MapServer, WFS and Oracle
   
   Hello list,
   
   I'm trying to get MapServer running as a WFS server with 
 an Oracle 
   data source. When using TAB files I have no problem, also 
 using the 
   Oracle datasource and letting MapServer draw it (WMS) works 
   properly.
   
   However, the WFS request only returns one result (a 
 correct one). My 
   total resulting XML is:
   wfs:FeatureCollection
  xsi:schemaLocation=http://www.opengis.net/wfs
   http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
   http://mapserver.gis.umn.edu/mapserver
   http://x.x.x/scripts/mapserv.exe?map=address.mapSERVICE=WFSV
   ERSION=1.0
   .0REQUEST=DescribeFeatureTypeTYPENAME=addressOUTPUTFORMAT=X
   MLSCHEMA
   gml:boundedBy
   gml:Box srsName=EPSG:4326
   gml:coordinates5.172200,52.038485
   5.173701,52.038853/gml:coordinates
   /gml:Box
   /gml:boundedBy
   /wfs:FeatureCollection
   
   There should be more results (confirmed by the WMS image and by 
   monitoring the query in Oracle). I also set DUMP to true and 
   gml_include_items all in my layer METADATA, so I also 
 expected 
   more fields. My layer definition is as follows:
   
 LAYER
 NAME address
 TYPE point
 CONNECTIONTYPE oraclespatial
 DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
 CONNECTION x/y...@z
 DUMP TRUE
 PROCESSING CLOSE_CONNECTION=DEFER
 CLASS
 SYMBOL circle
 OUTLINECOLOR 255 0 0
 SIZE 6
 NAME address
 END
 PROJECTION
 init=epsg:28992
 END
 METADATA
 wfs_title address
 wfs_srs EPSG:28992 EPSG:900913
 wms_title address
 wms_srs EPSG:28992 EPSG:900913
 gml_featureid ID
 gml_include_items all
 END
 END
   
   Any idea what I'm doing wrong? I'm using MapServer 5.4.2 
 with Oracle 
   10g.
   
   Regards,
   Jelmer Baas
   ___
   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] MapServer, WFS and Oracle

2009-11-18 Thread Jelmer Baas
Bart, Jukka,

The shoes taste wonderful. The request comes from OpenLayers, and I can't find 
how to change it to WFS 1.1, but that'll be another Google search, soon. Right 
now I thought it'd be smart to see if I at least can get *some* results, 
manually. This however also fails.

My current request
mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureSRS=EPSG%3A28992BBOX=125474.00,381967.999850,206652.000100,470382.335300

The coordinates come from a previous request (gml:boundedBy) and should 
definatly contain some points. An 
select count(id) from address where x  125474 and y  206652 and x  381967 
and y  470382
returns 24002 rows (the geo object is also saved as plain X/Y).

For completeness, here's my current MAP file:

MAP
NAME Test
STATUS ON
UNITS meters
FONTSET fontset.txt 

OUTPUTFORMAT
NAME aggpng24
DRIVER AGG/PNG
TRANSPARENT ON
IMAGEMODE RGBA
MIMETYPE image/png
EXTENSION png
END

WEB
  METADATA
wms_title Test
wfs_title Test
wms_srs EPSG:28992 
wfs_srs EPSG:28992 
wms_onlineresource url
wfs_onlineresource url
  END # METADATA
END #web
SYMBOLSET symbols_mapinfo2.sym
PROJECTION
init=epsg:28992
END
LAYER
NAME address
TYPE point
CONNECTIONTYPE oraclespatial
DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
CONNECTION x/y/z
DUMP TRUE
PROCESSING CLOSE_CONNECTION=DEFER
CLASS
SYMBOL circle
OUTLINECOLOR 255 0 0
SIZE 6
NAME address
END
PROJECTION
init=epsg:28992
END
METADATA
wfs_title address
wfs_srs EPSG:28992
wms_title address
wms_srs EPSG:28992
gml_featureid ZIPCODE
gml_include_items ZIPCODE
END
END
  
END # Map File

As you can see, I use the Dutch projection system everywhere. Yet the request 
only returns:
?xml version='1.0' encoding=ISO-8859-1 ?
wfs:FeatureCollection
   xmlns:ms=http://mapserver.gis.umn.edu/mapserver;
   xmlns:wfs=http://www.opengis.net/wfs;
   xmlns:gml=http://www.opengis.net/gml;
   xmlns:ogc=http://www.opengis.net/ogc;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd 
   http://mapserver.gis.umn.edu/mapserver 
url/mapserv.exe?map=address.mapamp;SERVICE=WFSamp;VERSION=1.0.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=addressamp;OUTPUTFORMAT=XMLSCHEMA
  gml:boundedBy
gml:Box srsName=EPSG:28992
gml:coordinates125474.00,381967.999850 
206652.000100,470382.335300/gml:coordinates
/gml:Box
  /gml:boundedBy
/wfs:FeatureCollection

Any more help would be greatly appreciated.

Regards,
Jelmer

 Hi,
 
 I hope you have tasty shoes.  WFS 1.0.0 does officially 
 support only one projection. I am not sure how Marverver has 
 implemented it, with Geoserver it is possible to use also 
 other projections by adding projection parameter to request.  
 However, I would try GetFeature request by using BBOX in 
 native projection.
 
 -Jukka Rahkonen-
 
  -Alkuperäinen viesti-
  Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
  [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta 
 Jelmer Baas
  Lähetetty: 18. marraskuuta 2009 13:06
  Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
  Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
  
  Jukka,
  
  Thanks for the quick reply. The request is:
  
  mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
  ON=1.0.0REQUEST=GetFeatureSRS=EPSG%3A4326BBOX=1.17194606291
 7749,52.038473357169345,5.173921509856943,52.03887593415947
  
  (Very zoomed out)
  
  If this is another projection issue, I'm going to eat my shoe. ;)
  
  Regards,
  Jelmer
  
   -Original Message-
   From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
   Sent: woensdag 18 november 2009 11:51
   To: Jelmer Baas; mapserver-users@lists.osgeo.org
   Subject: Re: [mapserver-users] MapServer, WFS and Oracle
   
   Hi,
   
   You seem not to get even a single feature back, all you get is an 
   empty bounding box. How does you GetFeature request look like?
   
   -Jukka Rahkonen-
   
   
   
-Alkuperäinen viesti-
Lähettäjä: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
   Jelmer Baas
Lähetetty: 18. marraskuuta 2009 12:11

Re: [mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Rahkonen Jukka
Hi,

If you haven't done it yet, check that you can for sure get some data out of 
your service.

mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSION=1.0.0REQUEST=GetFeatureMaxFeatures=10

If yes, have a look at the returned data and see what kind of coordinates it 
likes to send you. Just to be sure that your BBOX is correct. Also, add DEBUG=5 
to the layer definitions and look at the Mapserver errorfile to understand more 
about what is happening.

-Jukka-

 -Alkuperäinen viesti-
 Lähettäjä: Jelmer Baas [mailto:b...@speerit.nl] 
 Lähetetty: 18. marraskuuta 2009 14:39
 Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
 Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
 
 Bart, Jukka,
 
 The shoes taste wonderful. The request comes from OpenLayers, 
 and I can't find how to change it to WFS 1.1, but that'll be 
 another Google search, soon. Right now I thought it'd be 
 smart to see if I at least can get *some* results, manually. 
 This however also fails.
 
 My current request
 mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
 ON=1.0.0REQUEST=GetFeatureSRS=EPSG%3A28992BBOX=125474.0
0,381967.999850,206652.000100,470382.335300
 
 The coordinates come from a previous request (gml:boundedBy) 
 and should definatly contain some points. An select count(id) 
 from address where x  125474 and y  206652 and x  381967 
 and y  470382 returns 24002 rows (the geo object is also 
 saved as plain X/Y).
 
 For completeness, here's my current MAP file:
 
 MAP
   NAME Test
   STATUS ON
   UNITS meters
   FONTSET fontset.txt 
   
   OUTPUTFORMAT
   NAME aggpng24
   DRIVER AGG/PNG
   TRANSPARENT ON
   IMAGEMODE RGBA
   MIMETYPE image/png
   EXTENSION png
   END
   
 WEB
   METADATA
 wms_title Test
 wfs_title Test
 wms_srs EPSG:28992 
 wfs_srs EPSG:28992 
 wms_onlineresource url
 wfs_onlineresource url
   END # METADATA
 END #web
   SYMBOLSET symbols_mapinfo2.sym
   PROJECTION
   init=epsg:28992
   END
   LAYER
   NAME address
   TYPE point
   CONNECTIONTYPE oraclespatial
   DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
   CONNECTION x/y/z
   DUMP TRUE
   PROCESSING CLOSE_CONNECTION=DEFER
   CLASS
   SYMBOL circle
   OUTLINECOLOR 255 0 0
   SIZE 6
   NAME address
   END
   PROJECTION
   init=epsg:28992
   END
   METADATA
   wfs_title address
   wfs_srs EPSG:28992
   wms_title address
   wms_srs EPSG:28992
   gml_featureid ZIPCODE
   gml_include_items ZIPCODE
   END
   END
   
 END # Map File
 
 As you can see, I use the Dutch projection system everywhere. 
 Yet the request only returns:
 ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection
xmlns:ms=http://mapserver.gis.umn.edu/mapserver;
xmlns:wfs=http://www.opengis.net/wfs;
xmlns:gml=http://www.opengis.net/gml;
xmlns:ogc=http://www.opengis.net/ogc;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.opengis.net/wfs 
 http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd 
http://mapserver.gis.umn.edu/mapserver 
 url/mapserv.exe?map=address.mapamp;SERVICE=WFSamp;VERSION=
 1.0.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=addressamp
 ;OUTPUTFORMAT=XMLSCHEMA
   gml:boundedBy
   gml:Box srsName=EPSG:28992
   
 gml:coordinates125474.00,381967.999850 
 206652.000100,470382.335300/gml:coordinates
   /gml:Box
   /gml:boundedBy
 /wfs:FeatureCollection
 
 Any more help would be greatly appreciated.
 
 Regards,
 Jelmer
 
  Hi,
  
  I hope you have tasty shoes.  WFS 1.0.0 does officially 
 support only 
  one projection. I am not sure how Marverver has implemented 
 it, with 
  Geoserver it is possible to use also other projections by adding 
  projection parameter to request.
  However, I would try GetFeature request by using BBOX in native 
  projection.
  
  -Jukka Rahkonen-
  
   -Alkuperäinen viesti-
   Lähettäjä: mapserver-users-boun...@lists.osgeo.org
   [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
  Jelmer Baas
   Lähetetty: 18. marraskuuta 2009 13:06
   Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
   Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
   
   Jukka,
   
   Thanks for the quick reply. The request is:
   
   mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
   ON=1.0.0REQUEST=GetFeatureSRS=EPSG%3A4326BBOX=1.17194606291
  

RE: [mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Jelmer Baas
Jukka,

Thanks for the little tip! I just tested the test url you gave me, and it 
also didn't return anything. After checking the log files I found this:

[Wed Nov 18 13:50:46 2009].176000 msOracleSpatialLayerGetShape(): OracleSpatial 
error. Error parsing OracleSpatial DATA variable for query. To execute query 
functions you need to define one unique column [USING UNIQUE #column]

Chaning the query from
DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
to
DATA GEOLOC FROM ADDRESS USING UNIQUE ID SRID 90112 VERSION 10g

Did the trick. Not too bright of me that I didn't check the log file, I admit, 
but might I recommend outputting this message to the client anyway?

Thanks for the help, I can now continue fiddling with projections, my favorite! 
*sigh* :)

Regards,
Jelmer

 -Original Message-
 From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] 
 Sent: woensdag 18 november 2009 13:47
 To: Jelmer Baas; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapServer, WFS and Oracle
 
 Hi,
 
 If you haven't done it yet, check that you can for sure get 
 some data out of your service.
 
 mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
 ON=1.0.0REQUEST=GetFeatureMaxFeatures=10
 
 If yes, have a look at the returned data and see what kind of 
 coordinates it likes to send you. Just to be sure that your 
 BBOX is correct. Also, add DEBUG=5 to the layer definitions 
 and look at the Mapserver errorfile to understand more about 
 what is happening.
 
 -Jukka-
 
  -Alkuperäinen viesti-
  Lähettäjä: Jelmer Baas [mailto:b...@speerit.nl] 
  Lähetetty: 18. marraskuuta 2009 14:39
  Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
  Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
  
  Bart, Jukka,
  
  The shoes taste wonderful. The request comes from OpenLayers, 
  and I can't find how to change it to WFS 1.1, but that'll be 
  another Google search, soon. Right now I thought it'd be 
  smart to see if I at least can get *some* results, manually. 
  This however also fails.
  
  My current request
  mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
  ON=1.0.0REQUEST=GetFeatureSRS=EPSG%3A28992BBOX=125474.0
 0,381967.999850,206652.000100,470382.335300
  
  The coordinates come from a previous request (gml:boundedBy) 
  and should definatly contain some points. An select count(id) 
  from address where x  125474 and y  206652 and x  381967 
  and y  470382 returns 24002 rows (the geo object is also 
  saved as plain X/Y).
  
  For completeness, here's my current MAP file:
  
  MAP
  NAME Test
  STATUS ON
  UNITS meters
  FONTSET fontset.txt 
  
  OUTPUTFORMAT
  NAME aggpng24
  DRIVER AGG/PNG
  TRANSPARENT ON
  IMAGEMODE RGBA
  MIMETYPE image/png
  EXTENSION png
  END
  
  WEB
METADATA
  wms_title Test
  wfs_title Test
  wms_srs EPSG:28992 
  wfs_srs EPSG:28992 
  wms_onlineresource url
  wfs_onlineresource url
END # METADATA
  END #web
  SYMBOLSET symbols_mapinfo2.sym
  PROJECTION
  init=epsg:28992
  END
  LAYER
  NAME address
  TYPE point
  CONNECTIONTYPE oraclespatial
  DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
  CONNECTION x/y/z
  DUMP TRUE
  PROCESSING CLOSE_CONNECTION=DEFER
  CLASS
  SYMBOL circle
  OUTLINECOLOR 255 0 0
  SIZE 6
  NAME address
  END
  PROJECTION
  init=epsg:28992
  END
  METADATA
  wfs_title address
  wfs_srs EPSG:28992
  wms_title address
  wms_srs EPSG:28992
  gml_featureid ZIPCODE
  gml_include_items ZIPCODE
  END
  END

  END # Map File
  
  As you can see, I use the Dutch projection system everywhere. 
  Yet the request only returns:
  ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection
 xmlns:ms=http://mapserver.gis.umn.edu/mapserver;
 xmlns:wfs=http://www.opengis.net/wfs;
 xmlns:gml=http://www.opengis.net/gml;
 xmlns:ogc=http://www.opengis.net/ogc;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://www.opengis.net/wfs 
  http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd 
 http://mapserver.gis.umn.edu/mapserver 
  url/mapserv.exe?map=address.mapamp;SERVICE=WFSamp;VERSION=
  1.0.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=addressamp
  ;OUTPUTFORMAT=XMLSCHEMA
gml:boundedBy
  gml:Box srsName=EPSG:28992
  
  gml:coordinates125474.00,381967.999850 
  206652.000100,470382.335300/gml:coordinates
   

Re: [mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Smith, Michael ERDC-USACE-NH
Jelmer,

Also, when using WFS from Oracle, you should add the wfs_extent or
ows_extent metadata tags. Otherwise MapServer will request Oracle to do a
convex_hull to get the extent of your data. On large datasets, this can take
a while. Setting the extent metadata tag bypasses this check and uses the
value you specify.

Mike


-- 
Michael Smith
RSGIS Center
US Army Corps of Engineers



On 11/18/09 7:54 AM, Jelmer Baas b...@speerit.nl wrote:

 Jukka,
 
 Thanks for the little tip! I just tested the test url you gave me, and it
 also didn't return anything. After checking the log files I found this:
 
 [Wed Nov 18 13:50:46 2009].176000 msOracleSpatialLayerGetShape():
 OracleSpatial error. Error parsing OracleSpatial DATA variable for query. To
 execute query functions you need to define one unique column [USING UNIQUE
 #column]
 
 Chaning the query from
 DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
 to
 DATA GEOLOC FROM ADDRESS USING UNIQUE ID SRID 90112 VERSION 10g
 
 Did the trick. Not too bright of me that I didn't check the log file, I admit,
 but might I recommend outputting this message to the client anyway?
 
 Thanks for the help, I can now continue fiddling with projections, my
 favorite! *sigh* :)
 
 Regards,
 Jelmer
 
 -Original Message-
 From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
 Sent: woensdag 18 november 2009 13:47
 To: Jelmer Baas; mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] MapServer, WFS and Oracle
 
 Hi,
 
 If you haven't done it yet, check that you can for sure get
 some data out of your service.
 
 mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
 ON=1.0.0REQUEST=GetFeatureMaxFeatures=10
 
 If yes, have a look at the returned data and see what kind of
 coordinates it likes to send you. Just to be sure that your
 BBOX is correct. Also, add DEBUG=5 to the layer definitions
 and look at the Mapserver errorfile to understand more about
 what is happening.
 
 -Jukka-
 
 -Alkuperäinen viesti-
 Lähettäjä: Jelmer Baas [mailto:b...@speerit.nl]
 Lähetetty: 18. marraskuuta 2009 14:39
 Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
 Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
 
 Bart, Jukka,
 
 The shoes taste wonderful. The request comes from OpenLayers,
 and I can't find how to change it to WFS 1.1, but that'll be
 another Google search, soon. Right now I thought it'd be
 smart to see if I at least can get *some* results, manually.
 This however also fails.
 
 My current request
 mapserv.exe?map=address.maptypename=addressSERVICE=WFSVERSI
 ON=1.0.0REQUEST=GetFeatureSRS=EPSG%3A28992BBOX=125474.0
 0,381967.999850,206652.000100,470382.335300
 
 The coordinates come from a previous request (gml:boundedBy)
 and should definatly contain some points. An select count(id)
 from address where x  125474 and y  206652 and x  381967
 and y  470382 returns 24002 rows (the geo object is also
 saved as plain X/Y).
 
 For completeness, here's my current MAP file:
 
 MAP
 NAME Test
 STATUS ON
 UNITS meters
 FONTSET fontset.txt
 
 OUTPUTFORMAT
 NAME aggpng24
 DRIVER AGG/PNG
 TRANSPARENT ON
 IMAGEMODE RGBA
 MIMETYPE image/png
 EXTENSION png
 END
 
 WEB
   METADATA
 wms_title Test
 wfs_title Test
 wms_srs EPSG:28992 
 wfs_srs EPSG:28992 
 wms_onlineresource url
 wfs_onlineresource url
   END # METADATA
 END #web
 SYMBOLSET symbols_mapinfo2.sym
 PROJECTION
 init=epsg:28992
 END
 LAYER
 NAME address
 TYPE point
 CONNECTIONTYPE oraclespatial
 DATA GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g
 CONNECTION x/y/z
 DUMP TRUE
 PROCESSING CLOSE_CONNECTION=DEFER
 CLASS
 SYMBOL circle
 OUTLINECOLOR 255 0 0
 SIZE 6
 NAME address
 END
 PROJECTION
 init=epsg:28992
 END
 METADATA
 wfs_title address
 wfs_srs EPSG:28992
 wms_title address
 wms_srs EPSG:28992
 gml_featureid ZIPCODE
 gml_include_items ZIPCODE
 END
 END
   
 END # Map File
 
 As you can see, I use the Dutch projection system everywhere.
 Yet the request only returns:
 ?xml version='1.0' encoding=ISO-8859-1 ? wfs:FeatureCollection
xmlns:ms=http://mapserver.gis.umn.edu/mapserver;
xmlns:wfs=http://www.opengis.net/wfs;
xmlns:gml=http://www.opengis.net/gml;
xmlns:ogc=http://www.opengis.net/ogc;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.opengis.net/wfs
 http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
 url/mapserv.exe?map=address.mapamp;SERVICE=WFSamp;VERSION=
 1.0.0amp;REQUEST=DescribeFeatureTypeamp;TYPENAME=addressamp
 ;OUTPUTFORMAT=XMLSCHEMA
   gml:boundedBy
 gml:Box srsName=EPSG:28992
 
 gml:coordinates125474.00,381967.999850
 206652.000100,470382.335300/gml:coordinates
 /gml:Box
   /gml:boundedBy
 /wfs:FeatureCollection
 
 Any more help would be greatly appreciated.
 
 Regards,
 Jelmer
 
 Hi,
 
 I hope you have tasty shoes.  WFS 1.0.0 does officially
 support only 
 one 

RE: [mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Jelmer Baas
Michael,

Thanks for the tip. Indeed, I still need to add these tags, but since my
dataset wasn't working at all, I didn't do anything with that, yet.
Right now the query takes 16-20sec, so some optimization is in order.

Regards,
Jelmer


 Jelmer,
 
 Also, when using WFS from Oracle, you should add the wfs_extent or
 ows_extent metadata tags. Otherwise MapServer will request 
 Oracle to do a
 convex_hull to get the extent of your data. On large 
 datasets, this can take
 a while. Setting the extent metadata tag bypasses this check 
 and uses the
 value you specify.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] MapServer, WFS and Oracle

2009-11-18 Thread Jelmer Baas
Bart,

Thanks for the tip. I'll be using more Oracle access in the future, so I
guess I'll jump in the Compile-MapServer-On-Windows maze this evening.

Regards,
Jelmer


 Jelmer,
 
 you might want to check out Mapserver 5.6 release candidates, 
 since WFS was greatly optimized for database sources (single 
 pass query).
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] fatal error on linux server

2009-11-18 Thread Jelmer Baas
Might I also suggest checking if the .shp file is in the correct case?
KB_ACEH is uppercase, while .shp is lowercase, I've had plenty of
problems (i.e., typo's) with that.

Regards,
Jelmer

 As Francesco indicated, the primary error in this case is 
 that the file 
 /home/bleketux/public_html/cmh2/mapserver/shp/KB_ACEH.shp 
 cannot be opened.
 
 Make sure the file exists at that location, and that it is 
 readable by 
 the user running the Apache. hint: check the permissions on 
 /home/bleketux
 
 Daniel
 
 francesco wrote:
  Should check your mapfile if it is correctly parsed by the 
 mapscritpt. 
  Try drawing the mapfile using standard mapserver.exe and 
 see if it works.
  Francesco Pirotti
  
  MSulchan Darmawan ha scritto:
  Dear all,
 
  I've made a PHP script and tried it on windows using ms4w 
 (mapserver
  5.4.2) and it's completely works.
  Then I tried it on linux (ubuntu server 8.04 with 
 mapserver 5.4.2) but
  it produce the following error :
 
  Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
  'aceh'.
  in 
 /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
  on line 184
 
  Warning: [MapServer Error]: msShapefileOpen(): (KB_ACEH.shp)
  in 
 /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
  on line 184
 
  Warning: [MapServer Error]: msShapefileOpen():
  (/home/bleketux/public_html/cmh2/mapserver/shp/KB_ACEH.shp)
  in 
 /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
  on line 184
 
  Fatal error: Call to a member function SaveWebImage() on a 
 non-object
  in 
 /home/bleketux/public_html/cmh2/_modules/mod_petazm/frm_petazm.php
  on line 185
 
  Here is some script of line 180 - 185 :
 
  $strProj = proj=latlong,ellps=WGS84,datum=WGS84;
  $objMap-SetProjection ($strProj, MS_FALSE);
  $objMap-outputformat-Set (name, Format GIF);
  $objMap-outputformat-Set (extension, gif);
  $objImagePeta = $objMap-Draw();
  $objUrlPeta = $objImagePeta-SaveWebImage();
 
  To avoid permission problem, i've set chmod 777 to the 
 root web folder.
  Can you point me where should I fix the problem ?
  Thanks in advance.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] PHP mapscript $shape-buffer() takes a longtime

2009-11-18 Thread Worth Lutz
I'm learning a lot here.

I now understand how to get the buffered geometry quickly.

I am using the buffered geometry to use PHP mapscript to select parcel
intersecting the buffered geometry.

$layer-queryByShape($bufferedShape);

Are you telling me that there is a better/faster way to do this?



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ludwig
Kniprath
Sent: Wednesday, November 18, 2009 3:01 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] PHP mapscript $shape-buffer() takes a
longtime

We had the same problem. In deed the buffer-algorithm is very expensive,
especially with large polygons and a large buffer-radius. If you use
Postgis, you can simplify the Polygon with ST_Simplify or
ST_SimplifyPreserveTopology in dependency from scale and buffer-radius, this
will make the buffer-process much faster without significant loss of
quality. You can do this on runtime on your original data with dynamic
PostGIS-queries. If you don't use PostGis, you have to create simplified
layers.

Pseudo-PHP-PostGIS-SQL:
SELECT ...
ST_SetSRID(ST_BUFFER(ST_SIMPLIFY($geometery_field,$simplify_tolerance),$buff
er_radius, $number_of_segments),$srid)::geometry ...FROM...

And don't use the buffered polygon for geo-queries, there are faster ways in
PostGIS and Mapserver.

Regards
Ludwig Kniprath 


I'm trying to buffer a shape returned from a point query on a polygon layer
of parcels.

 

When I try to use:

 

$bufferedShape = $shape-buffer(200);

 

I get back a fatal error: Maximum execution time of 30 seconds exceeded.

I know that this is a php error message and that I could increase the
allowable execution time.

 

If I use a buffer distance of 175 I get results.

 

Should it take such a long time to but a buffer around this parcel?  It is
a
large parcel with one corner being a long curve like a quarter of a circle
and another section on one side being a half circle.
___
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] PHP mapscript $shape-buffer() takes a longtime

2009-11-18 Thread Guillaume Sueur
Distance maybe ? 

Guillaume

Le mercredi 18 novembre 2009 à 09:27 -0500, Worth Lutz a écrit :
 I'm learning a lot here.
 
 I now understand how to get the buffered geometry quickly.
 
 I am using the buffered geometry to use PHP mapscript to select parcel
 intersecting the buffered geometry.
 
 $layer-queryByShape($bufferedShape);
 
 Are you telling me that there is a better/faster way to do this?
 
 
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ludwig
 Kniprath
 Sent: Wednesday, November 18, 2009 3:01 AM
 To: mapserver-users@lists.osgeo.org
 Subject: Re: [mapserver-users] PHP mapscript $shape-buffer() takes a
 longtime
 
 We had the same problem. In deed the buffer-algorithm is very expensive,
 especially with large polygons and a large buffer-radius. If you use
 Postgis, you can simplify the Polygon with ST_Simplify or
 ST_SimplifyPreserveTopology in dependency from scale and buffer-radius, this
 will make the buffer-process much faster without significant loss of
 quality. You can do this on runtime on your original data with dynamic
 PostGIS-queries. If you don't use PostGis, you have to create simplified
 layers.
 
 Pseudo-PHP-PostGIS-SQL:
 SELECT ...
 ST_SetSRID(ST_BUFFER(ST_SIMPLIFY($geometery_field,$simplify_tolerance),$buff
 er_radius, $number_of_segments),$srid)::geometry ...FROM...
 
 And don't use the buffered polygon for geo-queries, there are faster ways in
 PostGIS and Mapserver.
 
 Regards
 Ludwig Kniprath 
 
 
 I'm trying to buffer a shape returned from a point query on a polygon layer
 of parcels.
 
  
 
 When I try to use:
 
  
 
 $bufferedShape = $shape-buffer(200);
 
  
 
 I get back a fatal error: Maximum execution time of 30 seconds exceeded.
 
 I know that this is a php error message and that I could increase the
 allowable execution time.
 
  
 
 If I use a buffer distance of 175 I get results.
 
  
 
 Should it take such a long time to but a buffer around this parcel?  It is
 a
 large parcel with one corner being a long curve like a quarter of a circle
 and another section on one side being a half circle.
 ___
 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] MapServer, WFS and Oracle

2009-11-18 Thread Bart van den Eijnden
Jelmer,

you might want to check out Mapserver 5.6 release candidates, since WFS was 
greatly optimized for database sources (single pass query).

Best regards,
Bart

On Nov 18, 2009, at 2:20 PM, Jelmer Baas wrote:

 Michael,
 
 Thanks for the tip. Indeed, I still need to add these tags, but since my
 dataset wasn't working at all, I didn't do anything with that, yet.
 Right now the query takes 16-20sec, so some optimization is in order.
 
 Regards,
 Jelmer
 
 
 Jelmer,
 
 Also, when using WFS from Oracle, you should add the wfs_extent or
 ows_extent metadata tags. Otherwise MapServer will request 
 Oracle to do a
 convex_hull to get the extent of your data. On large 
 datasets, this can take
 a while. Setting the extent metadata tag bypasses this check 
 and uses the
 value you specify.
 ___
 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] PHP mapscript $shape-buffer() takes a longtime

2009-11-18 Thread Daniel Morissette

Worth Lutz wrote:

I'm learning a lot here.

I now understand how to get the buffered geometry quickly.

I am using the buffered geometry to use PHP mapscript to select parcel
intersecting the buffered geometry.

$layer-queryByShape($bufferedShape);

Are you telling me that there is a better/faster way to do this?



Yes, queryByShape() respects the TOLERANCE/TOLERANCEUNITS layer 
parameters. So you could set the TOLERANCE to your buffer value and then 
queryByShape() on the original feature will select all features that 
intersect the buffer.


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


RE: [mapserver-users] PHP mapscript $shape-buffer() takes a longtime

2009-11-18 Thread Steve Lime
You may not need to buffer at all. The shape query honors layer tolerances so
you can find parcels within a certain distance. So if $layer-{tolerance} is 500
and $layer-{toleranceunits} is 'meters' then your shape query will find all 
features within 500 meters. If you don't need to draw the buffered shape then
this might be a good option.

Steve

 Worth Lutz w...@mindspring.com 11/18/09 8:23 AM 
I'm learning a lot here.

I now understand how to get the buffered geometry quickly.

I am using the buffered geometry to use PHP mapscript to select parcel
intersecting the buffered geometry.

$layer-queryByShape($bufferedShape);

Are you telling me that there is a better/faster way to do this?



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ludwig
Kniprath
Sent: Wednesday, November 18, 2009 3:01 AM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] PHP mapscript $shape-buffer() takes a
longtime

We had the same problem. In deed the buffer-algorithm is very expensive,
especially with large polygons and a large buffer-radius. If you use
Postgis, you can simplify the Polygon with ST_Simplify or
ST_SimplifyPreserveTopology in dependency from scale and buffer-radius, this
will make the buffer-process much faster without significant loss of
quality. You can do this on runtime on your original data with dynamic
PostGIS-queries. If you don't use PostGis, you have to create simplified
layers.

Pseudo-PHP-PostGIS-SQL:
SELECT ...
ST_SetSRID(ST_BUFFER(ST_SIMPLIFY($geometery_field,$simplify_tolerance),$buff
er_radius, $number_of_segments),$srid)::geometry ...FROM...

And don't use the buffered polygon for geo-queries, there are faster ways in
PostGIS and Mapserver.

Regards
Ludwig Kniprath 


I'm trying to buffer a shape returned from a point query on a polygon layer
of parcels.

 

When I try to use:

 

$bufferedShape = $shape-buffer(200);

 

I get back a fatal error: Maximum execution time of 30 seconds exceeded.

I know that this is a php error message and that I could increase the
allowable execution time.

 

If I use a buffer distance of 175 I get results.

 

Should it take such a long time to but a buffer around this parcel?  It is
a
large parcel with one corner being a long curve like a quarter of a circle
and another section on one side being a half circle.
___
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] Problems with SLD

2009-11-18 Thread David Alda Fernandez de Lezea
Hello, 
 
I'm quite new in MapServer, and I'm trying to apply some SLD's to a polygon 
layer served via WMS with MapServer, and I want these ploygons to have some 
transparency, and I specify the field fill-opacity to 0.5 but in the returned 
image the polygon is filled with opacity = 1. What could be happening??
 
Thanks.
 

 

 

Un saludo,

 

··


David Alda Fernández de Lezea

Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad

 

IKT

Granja Modelo s/n · 01192 · Arkaute (Araba)


··
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··
email: da...@ikt.esweb: www.ikt.es 
http://www.ikt.es/ 
··

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


[mapserver-users] read HTML tags in template

2009-11-18 Thread Steve . Toutant
Hi,
I use a WMSGetFeatureInfo, from openlayers, to query a layer in postgis. 
It queries a TEXT variable containing HTML tags such as br.
Exemple: the value is HibrHellobr 

In my template I have 
Comment: [htmlcomment]

When I show the result of the query I see HibrHellobr. I would like to 
see
Hi
Hello

Is it possible to manage this in the template?
thanks
steve___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problems with SLD

2009-11-18 Thread Yewondwossen Assefa


David Alda Fernandez de Lezea wrote:

Hello,
 
I'm quite new in MapServer, and I'm trying to apply some SLD's to a 
polygon layer served via WMS with MapServer, and I want these ploygons 
to have some transparency, and I specify the field fill-opacity to 0.5 
but in the returned image the polygon is filled with opacity = 1. What 
could be happening??
 
Thanks.
 

 


David,

The fill-opacity parameter should be supported as MapServer version 
5.2. Note also that style level opacity is only available through the 
AGG format.  If both these cases are met and you still have an issue, 
you can send me/point me to your sld and I can give it a quick look.


regards,

--

Assefa Yewondwossen   
Software Analyst   

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


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



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


[mapserver-users] template not showing map

2009-11-18 Thread Bryan Hempen

Hi there!

i have a problem diplaying nodes, which are read from a 
postgresql/postgis database.


specifically the problem is that when trying to display the nodes using 
a pretty standard template i don not get a picture, but surprisingly it 
is generated in the tmp folder (with right timestamp). i am also able to 
show it via web when navigating to the tmp folder, so it might not be a 
problem of user rights.


http://www.pictureupload.de/originals/pictures/181109204617_no_map_displayed.png
shows what it looks like when viewing the template

http://www.pictureupload.de/originals/pictures/181109204754_picture_generated.png
but the picture is generated!

Hopefully you guys can help me if i provide you with the mapfile and the 
template-sourcecode.


please let me know if there is anything more you need me to provide you 
with.


thanks for the help
bryan hempen


# WFS.MAP

MAP
NAME   'WFS-Server'
IMAGETYPE  PNG
EXTENT8.01 52.2282 8.135 52.3109  #Osm-Koords.
UNITS  METERS
DEBUG ON
# SHAPEPATH  'C:/ms4w/Apache/htdocs/osnamap/data'
SYMBOLSET   '/home/sgraeule/public_html/mapserver/symbols/symbols.sym'
FONTSET   '/home/sgraeule/public_html/mapserver/fonts/fonts.list'
IMAGECOLOR200 200 200
SIZE 500 500

# Grundeinstellungen-

PROJECTION
  'init=epsg:4326'
END

WEB
   TEMPLATE  '/home/sgraeule/public_html/mapserver/template.html'
   IMAGEPATH '/home/sgraeule/public_html/tmp/'
   IMAGEURL  '/tmp/'


METADATA
 WFS_TITLE WFS-Test
 WFS_SRS epsg:4326
 WFS_ABSTRACT POIS
 WFS_ONLINERESOURCE
http://igf-project.igf.uni-osnabrueck.de/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map;
END

END


LAYER
  SYMBOLSCALE 5
  NAME 'punkt_db'# Layer-Name, der in OpenLayers aufgerufen 
wird

  TYPE POINT
  STATUS   DEFAULT

  CONNECTIONTYPE postgis# Verbindung zur PostGIS-Datenbank
  CONNECTION user=# password=# dbname=# host=localhost port=5432
  DATA geom from nodes
  CLASSITEM'id'

  DUMP TRUE
  METADATA
   WFS_TITLE geb
   WFS_SRS epsg:4326  # Festlegung des Koordinatensystems
   gml_featureid id
   GML_INCLUDE_ITEMS all
  END

   CLASS  # Stil-Optionen; spielen fuer OpenLayers
keine Rolle
  STYLE
SYMBOL 'circle'
 SIZE 9
 MINSIZE 9
 MAXSIZE 15
 COLOR 0 0 200
  END
  END
END



END


!-- MapServer Template --
html
head
titleBeispiel zum UMN MapServer/title
/head
body font face=VERDANA,ARIAL,HELVETICA
bBeispiel: UMN MapServer/bbr
a 
href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img 



br
 a 
href=/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.mapAusgangszustand/a 


 form method=GET action=/cgi-bin/mapserv


table
tr

td valign=top


input type=image name=img src=[img] border=1

br

/td

input type=hidden name=map value=[map] !-- Pfad zur map-Datei --
input type=hidden name=imgext value=[mapext] !-- 
Kartenausdehnung --
input type=hidden name=imgxy value=190 190 !-- das mittlere 
Pixel der Grafik (dient als Zentrum beim Zoomen) --




td valign=top




brbr



bMouml;chten Sie Browsen oder eine Abfrage durchfuuml;hren?/bbr
  input type=radio name=mode value=browse 
checkedBrowse/inputbr
  input type=radio name=mode 
value=queryAbfrage/inputbrbrbr

  Zoombr
select name=zoom size=1

option value=44X hinein/option
option value=22X hinein/option
option value=1 selectednein/option
option value=-22X heraus/option
option value=-44X heraus/option

/selectbr
/form
/td
/tr
table

!--  img src=[legend]  --


/body

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


RE: [mapserver-users] template not showing map

2009-11-18 Thread Fawcett, David (MPCA)
Is your IMAGEURL correct?  

Is your template correctly referencing the directory where the image is being 
created?

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
Sent: Wednesday, November 18, 2009 1:50 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] template not showing map

Hi there!

i have a problem diplaying nodes, which are read from a 
postgresql/postgis database.

specifically the problem is that when trying to display the nodes using 
a pretty standard template i don not get a picture, but surprisingly it 
is generated in the tmp folder (with right timestamp). i am also able to 
show it via web when navigating to the tmp folder, so it might not be a 
problem of user rights.

http://www.pictureupload.de/originals/pictures/181109204617_no_map_displayed.png
shows what it looks like when viewing the template

http://www.pictureupload.de/originals/pictures/181109204754_picture_generated.png
but the picture is generated!

Hopefully you guys can help me if i provide you with the mapfile and the 
template-sourcecode.

please let me know if there is anything more you need me to provide you 
with.

thanks for the help
bryan hempen


# WFS.MAP

MAP
NAME   'WFS-Server'
IMAGETYPE  PNG
EXTENT8.01 52.2282 8.135 52.3109  #Osm-Koords.
UNITS  METERS
DEBUG ON
# SHAPEPATH  'C:/ms4w/Apache/htdocs/osnamap/data'
SYMBOLSET   '/home/sgraeule/public_html/mapserver/symbols/symbols.sym'
FONTSET   '/home/sgraeule/public_html/mapserver/fonts/fonts.list'
IMAGECOLOR200 200 200
SIZE 500 500

# Grundeinstellungen-

PROJECTION
   'init=epsg:4326'
END

WEB
TEMPLATE  '/home/sgraeule/public_html/mapserver/template.html'
IMAGEPATH '/home/sgraeule/public_html/tmp/'
IMAGEURL  '/tmp/'


METADATA
  WFS_TITLE WFS-Test
  WFS_SRS epsg:4326
  WFS_ABSTRACT POIS
  WFS_ONLINERESOURCE
http://igf-project.igf.uni-osnabrueck.de/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map;
END

END


LAYER
   SYMBOLSCALE 5
   NAME 'punkt_db'# Layer-Name, der in OpenLayers aufgerufen 
wird
   TYPE POINT
   STATUS   DEFAULT

   CONNECTIONTYPE postgis# Verbindung zur PostGIS-Datenbank
   CONNECTION user=# password=# dbname=# host=localhost port=5432
   DATA geom from nodes
   CLASSITEM'id'

   DUMP TRUE
   METADATA
WFS_TITLE geb
WFS_SRS epsg:4326  # Festlegung des Koordinatensystems
gml_featureid id
GML_INCLUDE_ITEMS all
   END

CLASS  # Stil-Optionen; spielen fuer OpenLayers
keine Rolle
   STYLE
 SYMBOL 'circle'
  SIZE 9
  MINSIZE 9
  MAXSIZE 15
  COLOR 0 0 200
   END
   END
END



END


!-- MapServer Template --
html
head
titleBeispiel zum UMN MapServer/title
/head
body font face=VERDANA,ARIAL,HELVETICA
bBeispiel: UMN MapServer/bbr
a 
href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img
 


br
  a 
href=/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.mapAusgangszustand/a
 

  form method=GET action=/cgi-bin/mapserv


table
tr

td valign=top


input type=image name=img src=[img] border=1

br

/td

input type=hidden name=map value=[map] !-- Pfad zur map-Datei --
input type=hidden name=imgext value=[mapext] !-- 
Kartenausdehnung --
input type=hidden name=imgxy value=190 190 !-- das mittlere 
Pixel der Grafik (dient als Zentrum beim Zoomen) --



td valign=top




brbr



bMouml;chten Sie Browsen oder eine Abfrage durchfuuml;hren?/bbr
   input type=radio name=mode value=browse 
checkedBrowse/inputbr
   input type=radio name=mode 
value=queryAbfrage/inputbrbrbr
   Zoombr
select name=zoom size=1

option value=44X hinein/option
option value=22X hinein/option
option value=1 selectednein/option
option value=-22X heraus/option
option value=-44X heraus/option

/selectbr
/form
/td
/tr
table

!--  img src=[legend]  --


/body

/html
___
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] template not showing map

2009-11-18 Thread Bryan Hempen

Fawcett, David (MPCA) schrieb:

Also, do you have an opening tag for your image?  I just see the below line 
with only a closing tag for img:

a 
href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img


David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
Sent: Wednesday, November 18, 2009 1:50 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] template not showing map

Hi there!

i have a problem diplaying nodes, which are read from a 
postgresql/postgis database.


specifically the problem is that when trying to display the nodes using 
a pretty standard template i don not get a picture, but surprisingly it 
is generated in the tmp folder (with right timestamp). i am also able to 
show it via web when navigating to the tmp folder, so it might not be a 
problem of user rights.


http://www.pictureupload.de/originals/pictures/181109204617_no_map_displayed.png
shows what it looks like when viewing the template

http://www.pictureupload.de/originals/pictures/181109204754_picture_generated.png
but the picture is generated!

Hopefully you guys can help me if i provide you with the mapfile and the 
template-sourcecode.


please let me know if there is anything more you need me to provide you 
with.


thanks for the help
bryan hempen


# WFS.MAP

MAP
NAME   'WFS-Server'
IMAGETYPE  PNG
EXTENT8.01 52.2282 8.135 52.3109  #Osm-Koords.
UNITS  METERS
DEBUG ON
# SHAPEPATH  'C:/ms4w/Apache/htdocs/osnamap/data'
SYMBOLSET   '/home/sgraeule/public_html/mapserver/symbols/symbols.sym'
FONTSET   '/home/sgraeule/public_html/mapserver/fonts/fonts.list'
IMAGECOLOR200 200 200
SIZE 500 500

# Grundeinstellungen-

PROJECTION
   'init=epsg:4326'
END

WEB
TEMPLATE  '/home/sgraeule/public_html/mapserver/template.html'
IMAGEPATH '/home/sgraeule/public_html/tmp/'
IMAGEURL  '/tmp/'


METADATA
  WFS_TITLE WFS-Test
  WFS_SRS epsg:4326
  WFS_ABSTRACT POIS
  WFS_ONLINERESOURCE
http://igf-project.igf.uni-osnabrueck.de/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map;
END

END


LAYER
   SYMBOLSCALE 5
   NAME 'punkt_db'# Layer-Name, der in OpenLayers aufgerufen 
wird

   TYPE POINT
   STATUS   DEFAULT

   CONNECTIONTYPE postgis# Verbindung zur PostGIS-Datenbank
   CONNECTION user=# password=# dbname=# host=localhost port=5432
   DATA geom from nodes
   CLASSITEM'id'

   DUMP TRUE
   METADATA
WFS_TITLE geb
WFS_SRS epsg:4326  # Festlegung des Koordinatensystems
gml_featureid id
GML_INCLUDE_ITEMS all
   END

CLASS  # Stil-Optionen; spielen fuer OpenLayers
keine Rolle
   STYLE
 SYMBOL 'circle'
  SIZE 9
  MINSIZE 9
  MAXSIZE 15
  COLOR 0 0 200
   END
   END
END



END


!-- MapServer Template --
html
head
titleBeispiel zum UMN MapServer/title
/head
body font face=VERDANA,ARIAL,HELVETICA
bBeispiel: UMN MapServer/bbr
a 
href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img 



br
  a 
href=/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.mapAusgangszustand/a 


  form method=GET action=/cgi-bin/mapserv


table
tr

td valign=top


input type=image name=img src=[img] border=1

br

/td

input type=hidden name=map value=[map] !-- Pfad zur map-Datei --
input type=hidden name=imgext value=[mapext] !-- 
Kartenausdehnung --
input type=hidden name=imgxy value=190 190 !-- das mittlere 
Pixel der Grafik (dient als Zentrum beim Zoomen) --




td valign=top




brbr



bMouml;chten Sie Browsen oder eine Abfrage durchfuuml;hren?/bbr
   input type=radio name=mode value=browse 
checkedBrowse/inputbr
   input type=radio name=mode 
value=queryAbfrage/inputbrbrbr

   Zoombr
select name=zoom size=1

option value=44X hinein/option
option value=22X hinein/option
option value=1 selectednein/option
option value=-22X heraus/option
option value=-44X heraus/option

/selectbr
/form
/td
/tr
table

!--  img src=[legend]  --


/body

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




hi!

imagepath + imageurl are definately set right now, but it does not 
change anything.


IMAGEPATH '/home/sgraeule/public_html/mapserver/tmp/'
IMAGEURL  '/home/sgraeule/public_html/mapserver/tmp/'

you may want to take a look by yourself: 
http://igf-project.igf.uni-osnabrueck.de/~sgraeule/mapserver/tmp/


i am not sure about how to use the image-tag, so i added the following 
piece of code to the template.


img src=[img] /img

when executed umn mapserver correctly makes it img 
src=/home/sgraeule/public_html/mapserver/tmp/WFS-Server12585768438242.png 
/img
,but my firefox still does not show the picture, but just a hint 

[mapserver-users] mapserver and PAL

2009-11-18 Thread G. Allegri
Hello list,
has the integration of PAL (label placement library) with Mapserver ever
been considered?
There is a lot of work in progress in other osgeo projectd (eg qgis) to
leverage on it, and I was wondering if also Mapserver could benefit of it.

thanks,
giovanni

PAL: http://pal.heig-vd.ch/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] template not showing map

2009-11-18 Thread Fawcett, David (MPCA)
I really don't think that your IMAGEURL is correct now.  

IMAGEPATH is the path to your temp directory.  

IMAGEURL is the URL that you use to access this same directory using your Web 
server/browser.  It should be relative to your Web root.  

I would guess that your IMAGEURL might be '/~sgraeule/mapserver/tmp/' 

David.
-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
Sent: Wednesday, November 18, 2009 2:53 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] template not showing map

Fawcett, David (MPCA) schrieb:
 Also, do you have an opening tag for your image?  I just see the below line 
 with only a closing tag for img:
 
 a 
 href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img
 
 David.
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
 Sent: Wednesday, November 18, 2009 1:50 PM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] template not showing map
 
 Hi there!
 
 i have a problem diplaying nodes, which are read from a 
 postgresql/postgis database.
 
 specifically the problem is that when trying to display the nodes using 
 a pretty standard template i don not get a picture, but surprisingly it 
 is generated in the tmp folder (with right timestamp). i am also able to 
 show it via web when navigating to the tmp folder, so it might not be a 
 problem of user rights.
 
 http://www.pictureupload.de/originals/pictures/181109204617_no_map_displayed.png
 shows what it looks like when viewing the template
 
 http://www.pictureupload.de/originals/pictures/181109204754_picture_generated.png
 but the picture is generated!
 
 Hopefully you guys can help me if i provide you with the mapfile and the 
 template-sourcecode.
 
 please let me know if there is anything more you need me to provide you 
 with.
 
 thanks for the help
 bryan hempen
 
 
 # WFS.MAP
 
 MAP
 NAME   'WFS-Server'
 IMAGETYPE  PNG
 EXTENT8.01 52.2282 8.135 52.3109  #Osm-Koords.
 UNITS  METERS
 DEBUG ON
 # SHAPEPATH  'C:/ms4w/Apache/htdocs/osnamap/data'
 SYMBOLSET   '/home/sgraeule/public_html/mapserver/symbols/symbols.sym'
 FONTSET   '/home/sgraeule/public_html/mapserver/fonts/fonts.list'
 IMAGECOLOR200 200 200
 SIZE 500 500
 
 # Grundeinstellungen-
 
 PROJECTION
'init=epsg:4326'
 END
 
 WEB
 TEMPLATE  '/home/sgraeule/public_html/mapserver/template.html'
 IMAGEPATH '/home/sgraeule/public_html/tmp/'
 IMAGEURL  '/tmp/'
 
 
 METADATA
   WFS_TITLE WFS-Test
   WFS_SRS epsg:4326
   WFS_ABSTRACT POIS
   WFS_ONLINERESOURCE
 http://igf-project.igf.uni-osnabrueck.de/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map;
 END
 
 END
 
 
 LAYER
SYMBOLSCALE 5
NAME 'punkt_db'# Layer-Name, der in OpenLayers aufgerufen 
 wird
TYPE POINT
STATUS   DEFAULT
 
CONNECTIONTYPE postgis# Verbindung zur PostGIS-Datenbank
CONNECTION user=# password=# dbname=# host=localhost port=5432
DATA geom from nodes
CLASSITEM'id'
 
DUMP TRUE
METADATA
 WFS_TITLE geb
 WFS_SRS epsg:4326  # Festlegung des Koordinatensystems
 gml_featureid id
 GML_INCLUDE_ITEMS all
END
 
 CLASS  # Stil-Optionen; spielen fuer OpenLayers
 keine Rolle
STYLE
  SYMBOL 'circle'
   SIZE 9
   MINSIZE 9
   MAXSIZE 15
   COLOR 0 0 200
END
END
 END
 
 
 
 END
 
 
 !-- MapServer Template --
 html
 head
 titleBeispiel zum UMN MapServer/title
 /head
 body font face=VERDANA,ARIAL,HELVETICA
 bBeispiel: UMN MapServer/bbr
 a 
 href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img
  
 
 
 br
   a 
 href=/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.mapAusgangszustand/a
  
 
   form method=GET action=/cgi-bin/mapserv
 
 
 table
 tr
 
 td valign=top
 
 
 input type=image name=img src=[img] border=1
 
 br
 
 /td
 
 input type=hidden name=map value=[map] !-- Pfad zur map-Datei --
 input type=hidden name=imgext value=[mapext] !-- 
 Kartenausdehnung --
 input type=hidden name=imgxy value=190 190 !-- das mittlere 
 Pixel der Grafik (dient als Zentrum beim Zoomen) --
 
 
 
 td valign=top
 
 
 
 
 brbr
 
 
 
 bMouml;chten Sie Browsen oder eine Abfrage durchfuuml;hren?/bbr
input type=radio name=mode value=browse 
 checkedBrowse/inputbr
input type=radio name=mode 
 value=queryAbfrage/inputbrbrbr
Zoombr
 select name=zoom size=1
 
 option value=44X hinein/option
 option value=22X hinein/option
 option value=1 selectednein/option
 option value=-22X heraus/option
 option value=-44X heraus/option
 
 /selectbr
 /form
 /td
 /tr
 table
 
 !--  img src=[legend]  --
 
 
 /body
 
 /html
 

RE: [mapserver-users] template not showing map

2009-11-18 Thread Fawcett, David (MPCA)
As an aside for the doc gods...

On http://mapserver.org/mapfile/web.html, shouldn't it say:

IMAGEURL [url]
Base URL for IMAGEPATH. This is the URL that will take the web browser to 
IMAGEPATH to get the images.


And not:

IMAGEURL [path]
Base URL for IMAGEPATH. This is the URL that will take the web browser to 
IMAGEPATH to get the images.


And maybe mention that the URL should be relative to the Web root?

David.



-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
Sent: Wednesday, November 18, 2009 2:53 PM
To: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] template not showing map

Fawcett, David (MPCA) schrieb:
 Also, do you have an opening tag for your image?  I just see the below line 
 with only a closing tag for img:
 
 a 
 href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img
 
 David.
 
 -Original Message-
 From: mapserver-users-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bryan Hempen
 Sent: Wednesday, November 18, 2009 1:50 PM
 To: mapserver-users@lists.osgeo.org
 Subject: [mapserver-users] template not showing map
 
 Hi there!
 
 i have a problem diplaying nodes, which are read from a 
 postgresql/postgis database.
 
 specifically the problem is that when trying to display the nodes using 
 a pretty standard template i don not get a picture, but surprisingly it 
 is generated in the tmp folder (with right timestamp). i am also able to 
 show it via web when navigating to the tmp folder, so it might not be a 
 problem of user rights.
 
 http://www.pictureupload.de/originals/pictures/181109204617_no_map_displayed.png
 shows what it looks like when viewing the template
 
 http://www.pictureupload.de/originals/pictures/181109204754_picture_generated.png
 but the picture is generated!
 
 Hopefully you guys can help me if i provide you with the mapfile and the 
 template-sourcecode.
 
 please let me know if there is anything more you need me to provide you 
 with.
 
 thanks for the help
 bryan hempen
 
 
 # WFS.MAP
 
 MAP
 NAME   'WFS-Server'
 IMAGETYPE  PNG
 EXTENT8.01 52.2282 8.135 52.3109  #Osm-Koords.
 UNITS  METERS
 DEBUG ON
 # SHAPEPATH  'C:/ms4w/Apache/htdocs/osnamap/data'
 SYMBOLSET   '/home/sgraeule/public_html/mapserver/symbols/symbols.sym'
 FONTSET   '/home/sgraeule/public_html/mapserver/fonts/fonts.list'
 IMAGECOLOR200 200 200
 SIZE 500 500
 
 # Grundeinstellungen-
 
 PROJECTION
'init=epsg:4326'
 END
 
 WEB
 TEMPLATE  '/home/sgraeule/public_html/mapserver/template.html'
 IMAGEPATH '/home/sgraeule/public_html/tmp/'
 IMAGEURL  '/tmp/'
 
 
 METADATA
   WFS_TITLE WFS-Test
   WFS_SRS epsg:4326
   WFS_ABSTRACT POIS
   WFS_ONLINERESOURCE
 http://igf-project.igf.uni-osnabrueck.de/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.map;
 END
 
 END
 
 
 LAYER
SYMBOLSCALE 5
NAME 'punkt_db'# Layer-Name, der in OpenLayers aufgerufen 
 wird
TYPE POINT
STATUS   DEFAULT
 
CONNECTIONTYPE postgis# Verbindung zur PostGIS-Datenbank
CONNECTION user=# password=# dbname=# host=localhost port=5432
DATA geom from nodes
CLASSITEM'id'
 
DUMP TRUE
METADATA
 WFS_TITLE geb
 WFS_SRS epsg:4326  # Festlegung des Koordinatensystems
 gml_featureid id
 GML_INCLUDE_ITEMS all
END
 
 CLASS  # Stil-Optionen; spielen fuer OpenLayers
 keine Rolle
STYLE
  SYMBOL 'circle'
   SIZE 9
   MINSIZE 9
   MAXSIZE 15
   COLOR 0 0 200
END
END
 END
 
 
 
 END
 
 
 !-- MapServer Template --
 html
 head
 titleBeispiel zum UMN MapServer/title
 /head
 body font face=VERDANA,ARIAL,HELVETICA
 bBeispiel: UMN MapServer/bbr
 a 
 href='http://www.umn-mapserver-community.de'http://www.umn-mapserver-community.de/img
  
 
 
 br
   a 
 href=/cgi-bin/mapserv?map=/home/sgraeule/public_html/mapserver/wfs.mapAusgangszustand/a
  
 
   form method=GET action=/cgi-bin/mapserv
 
 
 table
 tr
 
 td valign=top
 
 
 input type=image name=img src=[img] border=1
 
 br
 
 /td
 
 input type=hidden name=map value=[map] !-- Pfad zur map-Datei --
 input type=hidden name=imgext value=[mapext] !-- 
 Kartenausdehnung --
 input type=hidden name=imgxy value=190 190 !-- das mittlere 
 Pixel der Grafik (dient als Zentrum beim Zoomen) --
 
 
 
 td valign=top
 
 
 
 
 brbr
 
 
 
 bMouml;chten Sie Browsen oder eine Abfrage durchfuuml;hren?/bbr
input type=radio name=mode value=browse 
 checkedBrowse/inputbr
input type=radio name=mode 
 value=queryAbfrage/inputbrbrbr
Zoombr
 select name=zoom size=1
 
 option value=44X hinein/option
 option value=22X hinein/option
 option value=1 selectednein/option
 option value=-22X heraus/option
 option value=-44X heraus/option
 
 

Re: [mapserver-users] Problem with a GetFeatureInfo - info_format = text/html

2009-11-18 Thread Daniel Morissette

Martin Ouellet wrote:

Hi,

I've got the current layer definition


[...]

TEMPLATE http://geomsp.msp.gouv.qc.ca/communs/todo2.html;

[...]




I receive this response:
[DATE_PRODUCTION] - mapserver dont seem to replace the variable with 
the query value




When you specify a URL in the TEMPLATE parameter, then the parameters 
replacement is done in the URL itself, and MapServer will redirect the 
client to the URL in which the variable replacements have been made e.g.


TEMPLATE 
http://geomsp.msp.gouv.qc.ca/communs/todo2.html?DATEPROD=[DATE_PRODUCTION];


To use a regular template file, you need to specify its path on disk, 
and then MapServer will load the template and do the variable 
replacements inside the template. e.g.


TEMPLATE /path/to/communs/todo2.html

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


Re: [mapserver-users] Problem with a GetFeatureInfo - info_format = text/html

2009-11-18 Thread Martin Ouellet
Thanks Daniel, with the correct path, it's working great!

but I also had to put the magic string at the top of my file to make it
work:
!-- Mapserver Template --

MartinOuellet

2009/11/18 Daniel Morissette dmorisse...@mapgears.com

 Martin Ouellet wrote:

 Hi,

 I've got the current layer definition

  [...]

  TEMPLATE http://geomsp.msp.gouv.qc.ca/communs/todo2.html;

 [...]




 I receive this response:
 [DATE_PRODUCTION] - mapserver dont seem to replace the variable with the
 query value


 When you specify a URL in the TEMPLATE parameter, then the parameters
 replacement is done in the URL itself, and MapServer will redirect the
 client to the URL in which the variable replacements have been made e.g.

 TEMPLATE 
 http://geomsp.msp.gouv.qc.ca/communs/todo2.html?DATEPROD=[DATE_PRODUCTION]
 

 To use a regular template file, you need to specify its path on disk, and
 then MapServer will load the template and do the variable replacements
 inside the template. e.g.

 TEMPLATE /path/to/communs/todo2.html

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

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


[mapserver-users] layer-getExtent() on raster layer

2009-11-18 Thread Josh Hevenor
I have a couple raster layers (ECW) and I'm trying to get the extent
using php mapscripts' layer-getExtent method. I don't get an error on
the call but when I try to use the resulting rectObj (eg.
$rectRasterExtent-minx) I get an error trying to access a non-object.

Does this function work on raster layers? What might I need in the map
file layer definition to facilitate this?

Thanks,

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


RE [mapserver-users] read HTML tags in template FIXED

2009-11-18 Thread Steve . Toutant
ok, I used [item name=htmlcomment escape=none]
instead of [htmlcomment]
steve




steve.tout...@inspq.qc.ca@lists.osgeo.org 
Envoyé par : mapserver-users-boun...@lists.osgeo.org
18/11/2009 10:44 AM

A
mapserver-users@lists.osgeo.org
cc

Objet
[mapserver-users] read HTML tags in template









Hi, 
I use a WMSGetFeatureInfo, from openlayers, to query a layer in postgis. 
It queries a TEXT variable containing HTML tags such as br. 
Exemple: the value is HibrHellobr 

In my template I have 
Comment: [htmlcomment] 

When I show the result of the query I see HibrHellobr. I would like to 
see 
Hi 
Hello 

Is it possible to manage this in the template? 
thanks 
steve___
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] layer-getExtent() on raster layer

2009-11-18 Thread Dan Little
Add the EXTENT directive under the LAYER definition...

LAYER
... stuff ...
EXTENT MINX MINY MAXX MAXY
... stuff...
END


- Original Message 
 From: Josh Hevenor jheve...@rogers.com
 To: mapserver-users mapserver-users@lists.osgeo.org
 Sent: Wed, November 18, 2009 4:23:39 PM
 Subject: [mapserver-users] layer-getExtent() on raster layer
 
 I have a couple raster layers (ECW) and I'm trying to get the extent
 using php mapscripts' layer-getExtent method. I don't get an error on
 the call but when I try to use the resulting rectObj (eg.
 $rectRasterExtent-minx) I get an error trying to access a non-object.
 
 Does this function work on raster layers? What might I need in the map
 file layer definition to facilitate this?
 
 Thanks,
 
 Josh
 ___
 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] Build Errors; Currently msLoadMap(): Unknown identifier. First token must be MAP, this doesn't look like a mapfile.

2009-11-18 Thread Richard Marsden
Hello,

I have been using MapServer for about 18 months to serve the base maps for
EcoMapCostaRica.com, and more recently, equal-area-maps.com.
Originally, I had a lot of trouble building it for the FreeBSD environment
used by my web host (Pair Networks), but a fellow user (Jason Birch) was
able to help. I believe this was MapServer 5.2, but could be wrong.

In the past week, Pair upgraded the version of FreeBSD/etc on my server, and
not-unexpectedly this broke MapServer.
I've had more success than last time, and I've managed to re-build
MapServer. My build was based on Jason's original instructions, but library
 MapServer versions were bumped to their latest (5.4.2 for MapServer). I
also configured GDAL to use the internal implementations of libtiff and
GeoTIFF, and I skipped PHP  (I don't use PHP MapScript).

Although it built, the two map applications (both based on OpenLayers) are
displaying white tiles instead of their correct MapServer-rendered maps.
I've tried a few things, including trying to use 24 bit AGG-derived images
(interestingly this results in slower display, implying that some of
MapServer's rendering is working? just it isn't displaying anything?).

I wasn't making much progress getting these completed applications to work,
so I thought I would go 'back to basics' and try to get a simple Hello World
to work. I've just re-entered the Hello World from Bill Kropla's Beginning
MapServer book. The resulting hello.map and hello.html are included below.
Needless to say, these are not working. I am getting the strange error of:

msLoadMap(): Unknown identifier. First token must be MAP, this doesn't look
like a mapfile.

What is wrong? I can't see anything wrong in my MAP file, unless something
fundamental has changed in the past couple of versions?  Inserting a new
line at the beginning with a MAP simply results in a parsing error on line
1!
Is there something to look for in my build process?  I can post the
MapServer config if that will help.

Here is my Hello World HTML:  ( http://www.winwaed.com/playpen/hello.html )

html
headtitleMapServer Hello World/title/head
body
form method=POST action=/playpen/mapserv.cgi
  input type=submit value=Click Me
  input type=hidden name=MAP value=/myhomedir/playpen/hello.map
  input type=hidden name=map_web_imagepath
value=/myhomedir/playpen/tmp/
/form
img src=[img] width=400 height=300 border=0
/body
/html


And here is my hello.map file:  ( /playpen/hello.map )

NAME Hello_World
SIZE 400 300
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.00 -1.00 1.00 1.00
WEB
  TEMPLATE /myhomedir/playpen/hello.html
  IMAGEPATH /myhomedir/playpen/tmp/
  IMAGEURL /playpen/tmp/
END
LAYER
  STATUS default
  TYPE point
  FEATURE
 POINTS 0.0 0.0 END
 TEXT Hello World
  END
  CLASS
 STYLE
COLOR 255 0 0
 END
 LABEL
TYPE bitmap
 END
  END
END
END



Fundamentally I am trying to get MapServer working on a Pair server
installation (FreeBSD, etc), serving WMS tiles to OpenLayers MapServer
layer objects. Source data are Shape files and GeoTIFF tiles. Image delivery
is currently in the form of PNG, which is preferred over JPEG (too lossy)
and GIF (okay for the shapefiles, but not the GeoTIFF-derived imagery).


Hopefully someone has some clues as to what is wrong with the Hello World?
If I can get this to work, it should give me some clues (or even fix) the
main problems I'm having with my applications.


Cheers,

Richard Marsden
http://www.winwaed.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] layer-getExtent() on raster layer

2009-11-18 Thread Josh Hevenor
Worked perfectly.  Thanks!

Dan Little wrote:
 Add the EXTENT directive under the LAYER definition...

 LAYER
 ... stuff ...
 EXTENT MINX MINY MAXX MAXY
 ... stuff...
 END


 - Original Message 
   
 From: Josh Hevenor jheve...@rogers.com
 To: mapserver-users mapserver-users@lists.osgeo.org
 Sent: Wed, November 18, 2009 4:23:39 PM
 Subject: [mapserver-users] layer-getExtent() on raster layer

 I have a couple raster layers (ECW) and I'm trying to get the extent
 using php mapscripts' layer-getExtent method. I don't get an error on
 the call but when I try to use the resulting rectObj (eg.
 $rectRasterExtent-minx) I get an error trying to access a non-object.

 Does this function work on raster layers? What might I need in the map
 file layer definition to facilitate this?

 Thanks,

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



   
 


 No virus found in this incoming message.
 Checked by AVG - www.avg.com 
 Version: 8.5.425 / Virus Database: 270.14.72/2511 - Release Date: 11/18/09 
 07:50:00

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


Re: [mapserver-users] layer-getExtent() on raster layer

2009-11-18 Thread Frank Warmerdam

Dan Little wrote:

Add the EXTENT directive under the LAYER definition...

LAYER
... stuff ...
EXTENT MINX MINY MAXX MAXY
... stuff...
END


- Original Message 

From: Josh Hevenor jheve...@rogers.com
To: mapserver-users mapserver-users@lists.osgeo.org
Sent: Wed, November 18, 2009 4:23:39 PM
Subject: [mapserver-users] layer-getExtent() on raster layer

I have a couple raster layers (ECW) and I'm trying to get the extent
using php mapscripts' layer-getExtent method. I don't get an error on
the call but when I try to use the resulting rectObj (eg.
$rectRasterExtent-minx) I get an error trying to access a non-object.

Does this function work on raster layers? What might I need in the map
file layer definition to facilitate this?


Josh / Dan,

I would add that getExtent() should now work in MapServer 5.6 for raster
layers with a single raster file (as opposed to tileindexed layers).
The EXTENT keyword is still needed for tileindexed layers for which it
is assumed to be expensive (or at least somewhat messy to code) to collect
the extents at runtime.

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

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


Re: [mapserver-users] Build Errors; Currently msLoadMap(): Unknown identifier. First token must be MAP, this doesn't look like a mapfile.

2009-11-18 Thread Smith, Michael ERDC-CRREL-NH
Richard,

Add a new line to the beginning of your mapfile of just the word MAP.

Eg 
MAP
NAME Hello_World
SIZE 400 300
IMAGECOLOR 249 245 186
IMAGETYPE png
EXTENT -1.00 -1.00 1.00 1.00

Its part of some security changes in the latest version of Mapserver. You
also need to add a SYMBOLSET to the top of symbol files and a new magic
token to templates

See here
http://mapserver.org/development/rfc/ms-rfc-56.html
For more info

Mike


-- 
Michael Smith
RSGIS Center
US Army Corps of Engineers




On 11/18/09 11:06 PM, Richard Marsden winw...@gmail.com wrote:

 Hello,
 
 I have been using MapServer for about 18 months to serve the base maps for
 EcoMapCostaRica.com, and more recently, equal-area-maps.com
 http://equal-area-maps.com .
 Originally, I had a lot of trouble building it for the FreeBSD environment
 used by my web host (Pair Networks), but a fellow user (Jason Birch) was able
 to help. I believe this was MapServer 5.2, but could be wrong.
 
 In the past week, Pair upgraded the version of FreeBSD/etc on my server, and
 not-unexpectedly this broke MapServer.
 I've had more success than last time, and I've managed to re-build MapServer.
 My build was based on Jason's original instructions, but library  MapServer
 versions were bumped to their latest (5.4.2 for MapServer). I also configured
 GDAL to use the internal implementations of libtiff and GeoTIFF, and I skipped
 PHP  (I don't use PHP MapScript).
 
 Although it built, the two map applications (both based on OpenLayers) are
 displaying white tiles instead of their correct MapServer-rendered maps. I've
 tried a few things, including trying to use 24 bit AGG-derived images
 (interestingly this results in slower display, implying that some of
 MapServer's rendering is working? just it isn't displaying anything?).
 
 I wasn't making much progress getting these completed applications to work, so
 I thought I would go 'back to basics' and try to get a simple Hello World to
 work. I've just re-entered the Hello World from Bill Kropla's Beginning
 MapServer book. The resulting hello.map and hello.html are included below.
 Needless to say, these are not working. I am getting the strange error of:
 
 msLoadMap(): Unknown identifier. First token must be MAP, this doesn't look
 like a mapfile. 
 
 What is wrong? I can't see anything wrong in my MAP file, unless something
 fundamental has changed in the past couple of versions?  Inserting a new line
 at the beginning with a MAP simply results in a parsing error on line 1!
 Is there something to look for in my build process?  I can post the MapServer
 config if that will help.
 
 Here is my Hello World HTML:  ( http://www.winwaed.com/playpen/hello.html )
 
 html
 headtitleMapServer Hello World/title/head
 body
 form method=POST action=/playpen/mapserv.cgi
   input type=submit value=Click Me
   input type=hidden name=MAP value=/myhomedir/playpen/hello.map
   input type=hidden name=map_web_imagepath
 value=/myhomedir/playpen/tmp/
 /form
 img src=[img] width=400 height=300 border=0
 /body
 /html
 
 
 And here is my hello.map file:  ( /playpen/hello.map )
 
 NAME Hello_World
 SIZE 400 300
 IMAGECOLOR 249 245 186
 IMAGETYPE png
 EXTENT -1.00 -1.00 1.00 1.00
 WEB
   TEMPLATE /myhomedir/playpen/hello.html
   IMAGEPATH /myhomedir/playpen/tmp/
   IMAGEURL /playpen/tmp/
 END
 LAYER
   STATUS default
   TYPE point
   FEATURE
  POINTS 0.0 0.0 END
  TEXT Hello World
   END
   CLASS
  STYLE
     COLOR 255 0 0
  END
  LABEL
     TYPE bitmap
  END
   END
 END
 END
 
 
 
 Fundamentally I am trying to get MapServer working on a Pair server
 installation (FreeBSD, etc), serving WMS tiles to OpenLayers MapServer layer
 objects. Source data are Shape files and GeoTIFF tiles. Image delivery is
 currently in the form of PNG, which is preferred over JPEG (too lossy) and GIF
 (okay for the shapefiles, but not the GeoTIFF-derived imagery).
 
 
 Hopefully someone has some clues as to what is wrong with the Hello World?
 If I can get this to work, it should give me some clues (or even fix) the main
 problems I'm having with my applications.
 
 
 Cheers,
 
 Richard Marsden
 http://www.winwaed.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