[mapserver-users] Dynamically generating map extents WITHOUT MapScript or templating using shp2img (or mapserv)

2011-01-07 Thread Matthew Pettis
Hi,

I'd like to query my PostGIS database for a polygon and then create a
.png file based on that polygon with the polygon's max extent with the
'shp2img' tool.  I'm likely to change the query frequently to find
different polygons, and would like MapServer to automatically
calculate the extent based on the result query so I don't have to run
a separate query to find the extent of that polygon and hardcode it
into the EXTENT directive for the given query.

I see in the documentation at http://mapserver.org/mapfile/map.html
that this should be possible:
---
EXTENT [minx] [miny] [maxx] [maxy]
The spatial extent of the map to be created. In most cases you will
need to specify this, although MapServer can sometimes (expensively)
calculate one if it is not specified.
---

However, I cannot find an example of how to do this.  I have a working
mapfile with an EXTENT value I've looked up, and when I use it, it
works fine.  I thought the natural thing to do would be to just
comment out the 'EXTENT' directive in the MAP section, but that gave
me an error.  Could someone point me to how to make this work?

OS: Ubuntu 8.04 LTS
Mapserver version: MapServer version 5.4.2 OUTPUT=GIF OUTPUT=PNG
OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=FASTCGI INPUT=EPPL7
INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE

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


Re: [mapserver-users] MapServer distro site down at http://vbkto.dyndns.org/sdk ?

2011-01-07 Thread Tamas Szekeres
Works for me...

Best regards,

Tamas



2011/1/7 Anzel, Phil - Fort Collins, CO 

> Hi, All,
>
> The MapServer distro site at http://vbkto.dyndns.org/sdk may need a bit of
> attention; all I get is a page with an amber background (full, yet
> incomplete, HTML shown below). Problem observed 19:00 UTC 7 Jan 2010.
>
> Thanks,
>
> - Phil Anzel
> NRCS/USDA/ITC/Vistronix Inc Web Soil Survey Developer
>
> ...start of HTML...
>  xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:w="urn:schemas-microsoft-com:office:word"
> xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
> xmlns="http://www.w3.org/TR/REC-html40";>
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Advisory Page
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> 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] connecting to hazards.fema.gov wms server

2011-01-07 Thread Mark Volz
Hello,

I was asked to add a layer from
http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL?  I cannot
connect because the service provides EPPL7 images, and adding "wms_format"
"image/gif"  or png, or jpg seems to have no impact.

Next, The identify feature returns an html page.  Can mapserver identify wms
services that return html pages? 

Thanks

Mark Volz
GIS Specialist
Lyon County, MN


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


[mapserver-users] MapServer distro site down at http://vbkto.dyndns.org/sdk ?

2011-01-07 Thread Anzel, Phil - Fort Collins, CO
Hi, All,

The MapServer distro site at http://vbkto.dyndns.org/sdk may need a bit of 
attention; all I get is a page with an amber background (full, yet incomplete, 
HTML shown below). Problem observed 19:00 UTC 7 Jan 2010.

Thanks,

- Phil Anzel
NRCS/USDA/ITC/Vistronix Inc Web Soil Survey Developer

...start of HTML...
http://www.w3.org/TR/REC-html40";>










Advisory Page











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


Re: [mapserver-users] Projection problems

2011-01-07 Thread Frank Warmerdam

On 11-01-07 02:40 PM, Jeff McKenna wrote:

On 11-01-07 10:49 AM, Jan Hartmann wrote:


Yes, the transformation to WGS84 for the Dutch coordinate system
("Amersfoort", "Rijksdriehoeksnet) is still *not* part of the latest
PROJ4 release (4.7.0, downloaded yesterday).


I have requested many changes to the EPSG 'geodetic dataset' throughout the
years, so maybe I can give you some advice:

- enter your change request through a form on the EPSG site:
http://www.epsg.org/Comms/Comment.asp
- it may take upto one year for the change to be accepted by the EPSG group and
included in the next EPSG geodetic dataset
- you will get an email from the EPSG group once that happens
- however it will take much longer for software that uses EPSG codes to update
their own releases with those new EPSG codes (this includes PROJ, QGIS, MS4W,
etc.)

Hope that sheds some light on the issue for you.


Jeff,

I think Jan's concern is that the transformation does exist in EPSG but
is not reflected in the last PROJ.4 release.  I believe this is fixed
in CVS and I really just need to push out a new PROJ.4 release reasonably
soon.

Jan - I'd appreciate it if you could confirm that:

  http://svn.osgeo.org/metacrs/proj/trunk/proj/nad/epsg

has the right value.

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] Projection problems

2011-01-07 Thread Jeff McKenna

On 11-01-07 10:49 AM, Jan Hartmann wrote:


Yes, the transformation to WGS84 for the Dutch coordinate system
("Amersfoort", "Rijksdriehoeksnet) is still *not* part of the latest
PROJ4 release (4.7.0, downloaded yesterday).


I have requested many changes to the EPSG 'geodetic dataset' throughout 
the years, so maybe I can give you some advice:


- enter your change request through a form on the EPSG site: 
http://www.epsg.org/Comms/Comment.asp
- it may take upto one year for the change to be accepted by the EPSG 
group and included in the next EPSG geodetic dataset

- you will get an email from the EPSG group once that happens
- however it will take much longer for software that uses EPSG codes to 
update their own releases with those new EPSG codes (this includes PROJ, 
QGIS, MS4W, etc.)


Hope that sheds some light on the issue for you.

-jeff

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


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


Re: [mapserver-users] Projection problems

2011-01-07 Thread Jan Hartmann
(Sorry for crossposting to the PROJ list, but this has been a problem 
for years going)


Yes, the transformation to WGS84 for the Dutch coordinate system 
("Amersfoort", "Rijksdriehoeksnet) is still *not* part of the latest 
PROJ4 release (4.7.0, downloaded yesterday). You need to change the 
formula for epsg:28992 in PROJ's epsg table and in PosGIS's 
"spatial_ref_sys" table, like Milo describes, else your maps will be 
about 100 meters off. You can read an extensive discussion about this, 
including an Excel spreadsheet to compute the towgs84 parameters from 
the official EPSG database at:


http://trac.osgeo.org/geotiff/ticket/22

PROJ gets its parameters from EPSG, but somehow it still doesn't manage 
to include the WGS84 transform.


Vriendelijke groeten,

Jan



On 01/07/11 15:22, Milo van der Linden wrote:

Funny,

Everytime I read "projection problems" on this list I think: Hey, this 
might be someone from the Netherlands.



You mean you would really like to have your bedrijventerreinen like this?

http://www.locatiemonitor.nl/LocationDetails2.aspx?lid=1437

(please wait for the bedrijventerreinen wms to appear)

I created the wms service for locatiemonitor and as I can see, we are 
"fishing in the same vijver"


Please read my blog post at 
http://blog.dogodigi.net/2010/08/19/dutch-coordinate-system-ellipsoid-correction/


And write a small thank you comment if it helped you solve your issue

;-)

Kind regards,

Milo van der Linden

2011/1/7 basvmrs mailto:b...@cipix.nl>>


Hi,

I've created a map server in which I try to output data that was
entered
using Google Maps V2 (drawing polygons). I used openlayers to
display the
results over a Bing layer.

There seems to be a problem in the projection, which is best
described using
an image and a link:

http://bir.cipixtest.nl/resources/gis/demo.html Demo
http://osgeo-org.1803224.n2.nabble.com/file/n5898717/forum.png

Notice how the areas seem to 'shift' when zooming in.

My mapfile looks like this:


#
# Start of map file
#
MAP
   NAME BIR
   STATUS ON
   SIZE 600 600
   EXTENT 4.4 51.85 4.6 51.95
   UNITS METERS

   IMAGETYPE PNG

   PROJECTION
   "init=epsg:900913"
   END

   TRANSPARENT ON

   LAYER
   NAME bedrijventerreinen
   TYPE POLYGON
   STATUS DEFAULT
   CONNECTIONTYPE OGR
   CONNECTION
"MySQL:bir,host=X,user=X,password=XXX,port=3306"
   DATA "SELECT * from gis_object"
   DUMP TRUE
   CLASS
   NAME 'Bedrijventerreinen'
   STYLE
   OUTLINECOLOR 0 0 0
   COLOR 200 200 200
   END
   END
   TEMPLATE "object.html"

   METADATA
   gml_include_items "all"
   WMS_TITLE "Bedrijventerreinen"
   WMS_ABSTRACT "Bedrijventerreinen in de
Regio Rotterdam; de gebieden zijn
een benadering en er kunnen geen rechten aan worden ontleend."
   WMS_SRS "EPSG:28992 EPSG:900913 EPSG:4326"
   END
   END

END # Map File

I don't have a clue why this is happening. I hope that someone can
explain
to me why this is happening and how to fix it.

Kind regards,
Bas
--
View this message in context:

http://osgeo-org.1803224.n2.nabble.com/Projection-problems-tp5898717p5898717.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org

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



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


Re: [mapserver-users] Re: Projection problems

2011-01-07 Thread Milo van der Linden
Hello Bas,

That is indeed the trick. In my blogpost I specifically target postgis, but
changing the epsg file is the way to go for mapserver, the parameters stay
the same (of course)

The locatiemonitor was for a previous employer of mine. But it is indeed a
nice tool

Good luck on your implementation!



> Thanks Milo! Looks like a very nice tool you have built.
>
> I also found this article (in Dutch):
> http://web.archiveorange.com/archive/v/J7KtnqcjuwiLWARtBrhN
> http://web.archiveorange.com/archive/v/J7KtnqcjuwiLWARtBrhN
>
> It seems like the proj4 28892-default definition is flawed! I fixed it by
> changing the definition in the epsg file that my mapserver was using:
> # Amersfoort / RD New
> <28992> +proj=sterea +lat_0=52.156160 +lon_0=5.387639 +k=1
> +x_0=155000 +y_0=463000 +ellps=bessel
> +towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812
> +units=m
> +no_defs <>
> #<28992> +proj=sterea +lat_0=52.156160 +lon_0=5.387639
> +k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs  <>
>
> (note the towgs84-command)
>
> Regards,
> Bas
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Projection-problems-tp5898717p5899397.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Projection problems

2011-01-07 Thread basvmrs

Thanks Milo! Looks like a very nice tool you have built.

I also found this article (in Dutch): 
http://web.archiveorange.com/archive/v/J7KtnqcjuwiLWARtBrhN
http://web.archiveorange.com/archive/v/J7KtnqcjuwiLWARtBrhN 

It seems like the proj4 28892-default definition is flawed! I fixed it by
changing the definition in the epsg file that my mapserver was using:
# Amersfoort / RD New
<28992> +proj=sterea +lat_0=52.156160 +lon_0=5.387639 +k=1
+x_0=155000 +y_0=463000 +ellps=bessel
+towgs84=565.237,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m
+no_defs <>
#<28992> +proj=sterea +lat_0=52.156160 +lon_0=5.387639
+k=0.079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs  <>

(note the towgs84-command)

Regards,
Bas
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Projection-problems-tp5898717p5899397.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Projection problems

2011-01-07 Thread Milo van der Linden
Funny,

Everytime I read "projection problems" on this list I think: Hey, this might
be someone from the Netherlands.


You mean you would really like to have your bedrijventerreinen like this?

http://www.locatiemonitor.nl/LocationDetails2.aspx?lid=1437

(please wait for the bedrijventerreinen wms to appear)

I created the wms service for locatiemonitor and as I can see, we are
"fishing in the same vijver"

Please read my blog post at
http://blog.dogodigi.net/2010/08/19/dutch-coordinate-system-ellipsoid-correction/

And write a small thank you comment if it helped you solve your issue

;-)

Kind regards,

Milo van der Linden

2011/1/7 basvmrs 

>
> Hi,
>
> I've created a map server in which I try to output data that was entered
> using Google Maps V2 (drawing polygons). I used openlayers to display the
> results over a Bing layer.
>
> There seems to be a problem in the projection, which is best described
> using
> an image and a link:
>
> http://bir.cipixtest.nl/resources/gis/demo.html Demo
> http://osgeo-org.1803224.n2.nabble.com/file/n5898717/forum.png
>
> Notice how the areas seem to 'shift' when zooming in.
>
> My mapfile looks like this:
>
>
> #
> # Start of map file
> #
> MAP
>NAME BIR
>STATUS ON
>SIZE 600 600
>EXTENT 4.4 51.85 4.6 51.95
>UNITS METERS
>
>IMAGETYPE PNG
>
>PROJECTION
>"init=epsg:900913"
>END
>
>TRANSPARENT ON
>
>LAYER
>NAME bedrijventerreinen
>TYPE POLYGON
>STATUS DEFAULT
>CONNECTIONTYPE OGR
>CONNECTION
> "MySQL:bir,host=X,user=X,password=XXX,port=3306"
>DATA "SELECT * from gis_object"
>DUMP TRUE
>CLASS
>NAME 'Bedrijventerreinen'
>STYLE
>OUTLINECOLOR 0 0 0
>COLOR 200 200 200
>END
>END
>TEMPLATE "object.html"
>
>METADATA
>gml_include_items "all"
>WMS_TITLE "Bedrijventerreinen"
>WMS_ABSTRACT "Bedrijventerreinen in de Regio
> Rotterdam; de gebieden zijn
> een benadering en er kunnen geen rechten aan worden ontleend."
>WMS_SRS "EPSG:28992 EPSG:900913 EPSG:4326"
>END
>END
>
> END # Map File
>
> I don't have a clue why this is happening. I hope that someone can explain
> to me why this is happening and how to fix it.
>
> Kind regards,
> Bas
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Projection-problems-tp5898717p5898717.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Projection problems

2011-01-07 Thread basvmrs

Hi,

I've created a map server in which I try to output data that was entered
using Google Maps V2 (drawing polygons). I used openlayers to display the
results over a Bing layer.

There seems to be a problem in the projection, which is best described using
an image and a link:

http://bir.cipixtest.nl/resources/gis/demo.html Demo 
http://osgeo-org.1803224.n2.nabble.com/file/n5898717/forum.png 

Notice how the areas seem to 'shift' when zooming in.

My mapfile looks like this:


#
# Start of map file
#
MAP
NAME BIR
STATUS ON
SIZE 600 600
EXTENT 4.4 51.85 4.6 51.95
UNITS METERS

IMAGETYPE PNG

PROJECTION
"init=epsg:900913"
END

TRANSPARENT ON

LAYER
NAME bedrijventerreinen
TYPE POLYGON
STATUS DEFAULT
CONNECTIONTYPE OGR
CONNECTION 
"MySQL:bir,host=X,user=X,password=XXX,port=3306"
DATA "SELECT * from gis_object"
DUMP TRUE
CLASS
NAME 'Bedrijventerreinen'
STYLE
OUTLINECOLOR 0 0 0
COLOR 200 200 200
END
END
TEMPLATE "object.html"

METADATA
gml_include_items "all"
WMS_TITLE "Bedrijventerreinen"
WMS_ABSTRACT "Bedrijventerreinen in de Regio Rotterdam; 
de gebieden zijn
een benadering en er kunnen geen rechten aan worden ontleend."
WMS_SRS "EPSG:28992 EPSG:900913 EPSG:4326"
END
END

END # Map File

I don't have a clue why this is happening. I hope that someone can explain
to me why this is happening and how to fix it.

Kind regards,
Bas
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Projection-problems-tp5898717p5898717.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