Mapfile Snippet Library / Open Source Cartographic Elements

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapfile Snippet Library / Open Source Cartographic Elements

David Bitner
What would be the appropriate place (is there an appropriate place) on
the mapserver site to create a library of little pieces from a mapfile
that could be reused by others.  I am thinking things like Styles,
Class Definitions, Font Files, etc..

I would love to see a place where someone could find examples of code
with either screenshots or links to an application using that code for
styling so that anyone looking to start with the creation of mapfiles
could just grab some pieces from the snippet library and get on thier
way.  Alternately, with a commenting system, all the great
cartographers that are part of this community could give input and we
could potentially get some collaboratively developed cartography.

As an example, I would love to see a section dedicated to roads.  As
part of this, I would love to see font files for symbols if anyone has
developed any, any particular styles people have come to use and then
the sections of code displaying all the classes for both lines and
annotation.  I know that there are some really slick looking roads
definitions using both "centerline" style roads as well as "curb to
curb" ie google maps style roads.

I know that designing styles is not difficult per se, but it can
definitely take a lot of futzing around to get something that looks
good and looking through all the apps out there, there are obviously
some folks who have done more futzing than others.  I think something
like this could leverage the abilities (and tastes) of the whole
community to try to raise the bar for visual appearance of Mapserver
output.

Any Comments?  Anyone else willing to add to a library like this?

David
Reply | Threaded
Open this post in threaded view
|

Re: Mapfile Snippet Library / Open Source Cartographic Elements

Fawcett, David-2
Great idea David.  

I have long thought that it would be great to have a repository for
symbol definition, sample symbol files, etc.  

Your idea of adding images or screenshots makes it a lot better!

David.

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On
Behalf Of David Bitner
Sent: Wednesday, January 18, 2006 11:56 AM
To: [hidden email]
Subject: [UMN_MAPSERVER-USERS] Mapfile Snippet Library / Open Source
Cartographic Elements


What would be the appropriate place (is there an appropriate place) on
the mapserver site to create a library of little pieces from a mapfile
that could be reused by others.  I am thinking things like Styles, Class
Definitions, Font Files, etc..

I would love to see a place where someone could find examples of code
with either screenshots or links to an application using that code for
styling so that anyone looking to start with the creation of mapfiles
could just grab some pieces from the snippet library and get on thier
way.  Alternately, with a commenting system, all the great cartographers
that are part of this community could give input and we could
potentially get some collaboratively developed cartography.

As an example, I would love to see a section dedicated to roads.  As
part of this, I would love to see font files for symbols if anyone has
developed any, any particular styles people have come to use and then
the sections of code displaying all the classes for both lines and
annotation.  I know that there are some really slick looking roads
definitions using both "centerline" style roads as well as "curb to
curb" ie google maps style roads.

I know that designing styles is not difficult per se, but it can
definitely take a lot of futzing around to get something that looks good
and looking through all the apps out there, there are obviously some
folks who have done more futzing than others.  I think something like
this could leverage the abilities (and tastes) of the whole community to
try to raise the bar for visual appearance of Mapserver output.

Any Comments?  Anyone else willing to add to a library like this?

David
Reply | Threaded
Open this post in threaded view
|

Re: Mapfile Snippet Library / Open Source Cartographic Elements

Gerry Creager N5JXS
In reply to this post by David Bitner
Weather?  We can contribute something to the library there...

gerry

David Bitner wrote:

> What would be the appropriate place (is there an appropriate place) on
> the mapserver site to create a library of little pieces from a mapfile
> that could be reused by others.  I am thinking things like Styles,
> Class Definitions, Font Files, etc..
>
> I would love to see a place where someone could find examples of code
> with either screenshots or links to an application using that code for
> styling so that anyone looking to start with the creation of mapfiles
> could just grab some pieces from the snippet library and get on thier
> way.  Alternately, with a commenting system, all the great
> cartographers that are part of this community could give input and we
> could potentially get some collaboratively developed cartography.
>
> As an example, I would love to see a section dedicated to roads.  As
> part of this, I would love to see font files for symbols if anyone has
> developed any, any particular styles people have come to use and then
> the sections of code displaying all the classes for both lines and
> annotation.  I know that there are some really slick looking roads
> definitions using both "centerline" style roads as well as "curb to
> curb" ie google maps style roads.
>
> I know that designing styles is not difficult per se, but it can
> definitely take a lot of futzing around to get something that looks
> good and looking through all the apps out there, there are obviously
> some folks who have done more futzing than others.  I think something
> like this could leverage the abilities (and tastes) of the whole
> community to try to raise the bar for visual appearance of Mapserver
> output.
>
> Any Comments?  Anyone else willing to add to a library like this?
>
> David

--
Gerry Creager -- [hidden email]
Texas Mesonet -- AATLT, Texas A&M University
Cell: 979.229.5301 Office: 979.458.4020  FAX 979.862.3983
MAIL:  AATLT, 3139 TAMU
Physical: 1700 Research Parkway, Suite 160,
College Station, TX 77843-3139
Reply | Threaded
Open this post in threaded view
|

Re: Mapfile Snippet Library / Open Source Cartographic Elements

Howard Butler-2
In reply to this post by David Bitner
I also think this would be a great idea.  A "Code Snippets" section
of the website would be very useful.  I was thinking it could go
right in the "Documentation" area as just another section.

I'm pretty busy these days, but I plan to get back to doing some
MapServer website development soon.  No hard promises, but look for
something over the next couple of months (I'll give you a heads up
when something is there).  Anyone who really wants to make this
happen faster and isn't afraid to get their hands *really* dirty with
plone should contact me off-list.

Howard

At 12:18 PM 1/18/2006, Fawcett, David wrote:

>Great idea David. =20
>
>I have long thought that it would be great to have a repository for
>symbol definition, sample symbol files, etc. =20
>
>Your idea of adding images or screenshots makes it a lot better!
>
>David.
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:[hidden email]] On
>Behalf Of David Bitner
>Sent: Wednesday, January 18, 2006 11:56 AM
>To: [hidden email]
>Subject: [UMN_MAPSERVER-USERS] Mapfile Snippet Library / Open Source
>Cartographic Elements
>
>
>What would be the appropriate place (is there an appropriate place) on
>the mapserver site to create a library of little pieces from a mapfile
>that could be reused by others.  I am thinking things like Styles, Class
>Definitions, Font Files, etc..
>
>I would love to see a place where someone could find examples of code
>with either screenshots or links to an application using that code for
>styling so that anyone looking to start with the creation of mapfiles
>could just grab some pieces from the snippet library and get on thier
>way.  Alternately, with a commenting system, all the great cartographers
>that are part of this community could give input and we could
>potentially get some collaboratively developed cartography.
>
>As an example, I would love to see a section dedicated to roads.  As
>part of this, I would love to see font files for symbols if anyone has
>developed any, any particular styles people have come to use and then
>the sections of code displaying all the classes for both lines and
>annotation.  I know that there are some really slick looking roads
>definitions using both "centerline" style roads as well as "curb to
>curb" ie google maps style roads.
>
>I know that designing styles is not difficult per se, but it can
>definitely take a lot of futzing around to get something that looks good
>and looking through all the apps out there, there are obviously some
>folks who have done more futzing than others.  I think something like
>this could leverage the abilities (and tastes) of the whole community to
>try to raise the bar for visual appearance of Mapserver output.
>
>Any Comments?  Anyone else willing to add to a library like this?
>
>David
Reply | Threaded
Open this post in threaded view
|

Terraserver WMS

Chip Taylor
In reply to this post by Fawcett, David-2
I am trying to create a group of layers using WMS on Microsoft Terraserver.

I run MapServer on an IIS6 web site as a CGI app.
I cannot seem to get this to work correctly.  Here is my Mapfile (at least
the pertinent sections:


# This is the site map file
NAME "sitemap"
UNITS DD
EXTENT -127.00 43.00 -115.00 50.00
SIZE 475 475
IMAGECOLOR 189 202 222
IMAGETYPE GIF

SHAPEPATH "../Shape_Files"
FONTSET "../fontset.txt"

#####################################
# Web object
#
WEB
     TEMPLATE "../HTML_Files/sitemap_eval.html"
   
     IMAGEPATH 'd:/wwwroot/tmp/'
     IMAGEURL "/tmp/"
END


#####################################
# TerraServer WMS
#
 LAYER
     NAME "TSOrtho1"
     METADATA
        "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
        "wms_srs"   "EPSG:26918" #NAD83 UTM zone 18N
        "wms_extent" "-78 0 -72 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS DEFAULT
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26918" #NAD83 UTM zone 18N
     END
  END

  LAYER
     NAME "TSOrtho2"
     METADATA
       "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26917" #NAD83 UTM zone 17N\
       "wms_extent" "-84 0 -78 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS DEFAULT
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26917" #NAD83 UTM zone 17N
     END
  END
  LAYER
     NAME "TSOrtho3"
     METADATA
       "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26916" #NAD83 UTM zone 16N\
       "wms_extent" "-90 0 -84 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS OFF
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26916" #NAD83 UTM zone 16N
     END
  END
  LAYER
     NAME "TSOrtho4"
     METADATA
      "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26915" #NAD83 UTM zone 15N\
       "wms_extent" "-96 0 -90 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS OFF
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx"
     PROJECTION
       "init=epsg:26915" #NAD83 UTM zone 15N
     END
  END
  LAYER
     NAME "TSOrtho5"
     METADATA
       "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26914" #NAD83 UTM zone 14N\
       "wms_extent" "-102 0 -96 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS OFF
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26914" #NAD83 UTM zone 14N
     END
  END
 END

Here is the error I get when I try to render the map:

msDrawMap(): WMS connection error. Failed to draw WMS layer named
'ortho-18'. This most likely happened because the remote WMS server returned
an invalid image, and XML exception or another unexpected result in response
to the GetMap request. Also check and make sure that the layer's connection
URL is valid.
msDrawRaster(): Image handling error. Unrecognized or unsupported image
format
drawEPP(): Image handling error. EPPL7 support is not available.

What am I doing wrong?  Thanks in advance for your help.

Chip Taylor
Prepared Response, Inc
Reply | Threaded
Open this post in threaded view
|

Re: Terraserver WMS

Ed McNierney-4
Chip -

Are you certain that's the map file you're really using for the request
that produces that error?  The error message refers to a layer named
"ortho-18", and your map file has no layer of that name.

The Microsoft TerraServer WMS services do not support GIF image requests
- the only image type supported is JPEG.  Be sure to check the
GetCapabilities document carefully so you don't request things the
server can't provide.

Your EXTENT seems to indicate that you want the output map to be in some
sort of "geographic" projection, but you do not have a PROJECTION block
in your map file to specify the output projection you want.  If you use
this technique you should realize that you will have problems at UTM
zone edges, as the TerraServer UTM layers will not match properly at
zone boundaries.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
[hidden email]
(978) 251-4242

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On
Behalf Of Chip Taylor
Sent: Wednesday, January 18, 2006 4:18 PM
To: [hidden email]
Subject: [UMN_MAPSERVER-USERS] Terraserver WMS

I am trying to create a group of layers using WMS on Microsoft
Terraserver.

I run MapServer on an IIS6 web site as a CGI app.
I cannot seem to get this to work correctly.  Here is my Mapfile (at
least the pertinent sections:


# This is the site map file
NAME "sitemap"
UNITS DD
EXTENT -127.00 43.00 -115.00 50.00
SIZE 475 475
IMAGECOLOR 189 202 222
IMAGETYPE GIF

SHAPEPATH "../Shape_Files"
FONTSET "../fontset.txt"

#####################################
# Web object
#
WEB
     TEMPLATE "../HTML_Files/sitemap_eval.html"
   
     IMAGEPATH 'd:/wwwroot/tmp/'
     IMAGEURL "/tmp/"
END


#####################################
# TerraServer WMS
#
 LAYER
     NAME "TSOrtho1"
     METADATA
        "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
        "wms_srs"   "EPSG:26918" #NAD83 UTM zone 18N
        "wms_extent" "-78 0 -72 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS DEFAULT
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26918" #NAD83 UTM zone 18N
     END
  END

  LAYER
     NAME "TSOrtho2"
     METADATA
       "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26917" #NAD83 UTM zone 17N\
       "wms_extent" "-84 0 -78 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS DEFAULT
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26917" #NAD83 UTM zone 17N
     END
  END
  LAYER
     NAME "TSOrtho3"
     METADATA
       "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26916" #NAD83 UTM zone 16N\
       "wms_extent" "-90 0 -84 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS OFF
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26916" #NAD83 UTM zone 16N
     END
  END
  LAYER
     NAME "TSOrtho4"
     METADATA
      "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26915" #NAD83 UTM zone 15N\
       "wms_extent" "-96 0 -90 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS OFF
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx"
     PROJECTION
       "init=epsg:26915" #NAD83 UTM zone 15N
     END
  END
  LAYER
     NAME "TSOrtho5"
     METADATA
       "wms_title" "USGS Digital Ortho-Quadrangles"
        "wms_server_version"  "1.1.1"
        "wms_formatlist"      "image/gif"
        "wms_format"          "image/gif"
        "wms_name"            "DOQ"
       "wms_srs"   "EPSG:26914" #NAD83 UTM zone 14N\
       "wms_extent" "-102 0 -96 90"
     END
     OFFSITE 255 255 255
     GROUP "ORTHODATA"
     STATUS OFF
     TYPE RASTER
     MINSCALE 1500
     MAXSCALE 80000
     CONNECTIONTYPE WMS
     CONNECTION "http://terraservice.net/ogcmap.ashx?"
     PROJECTION
       "init=epsg:26914" #NAD83 UTM zone 14N
     END
  END
 END

Here is the error I get when I try to render the map:

msDrawMap(): WMS connection error. Failed to draw WMS layer named
'ortho-18'. This most likely happened because the remote WMS server
returned an invalid image, and XML exception or another unexpected
result in response to the GetMap request. Also check and make sure that
the layer's connection URL is valid.
msDrawRaster(): Image handling error. Unrecognized or unsupported image
format
drawEPP(): Image handling error. EPPL7 support is not available.

What am I doing wrong?  Thanks in advance for your help.

Chip Taylor
Prepared Response, Inc
Reply | Threaded
Open this post in threaded view
|

Re: Terraserver WMS

Chip Taylor

Sorry, I renamed the layer from ortho-18 to TSOrtho1 after running the map and before sending the message.  My bad.

 

 

I think the JPEG issue is the problem.  I totally missed that.  As for the projection, I know that will be a problem and will be addressed before production.  I don't think that will prevent the map from displaying. 

 

I'll try changing the wms-format to jpeg.

 

Thanks for the help.

 

Chip

 

-----Original Message-----
From: UMN MapServer Users List [mailto:[hidden email]] On Behalf Of Ed McNierney
Sent: Wednesday, January 18, 2006 1:58 PM
To: [hidden email]
Subject: Re: [UMN_MAPSERVER-USERS] Terraserver WMS

 

Chip -

 

Are you certain that's the map file you're really using for the request

that produces that error?  The error message refers to a layer named

"ortho-18", and your map file has no layer of that name.

 

The Microsoft TerraServer WMS services do not support GIF image requests

- the only image type supported is JPEG.  Be sure to check the

GetCapabilities document carefully so you don't request things the

server can't provide.

 

Your EXTENT seems to indicate that you want the output map to be in some

sort of "geographic" projection, but you do not have a PROJECTION block

in your map file to specify the output projection you want.  If you use

this technique you should realize that you will have problems at UTM

zone edges, as the TerraServer UTM layers will not match properly at

zone boundaries.

 

      - Ed

 

Ed McNierney

President and Chief Mapmaker

TopoZone.com / Maps a la carte, Inc.

73 Princeton Street, Suite 305

North Chelmsford, MA  01863

[hidden email]

(978) 251-4242

 

Reply | Threaded
Open this post in threaded view
|

WMS Source for Orthoimages

Chip Taylor

Can anyone tell me a good WMS for Ortho imagery / DOQ besides Terraserver?  The higher the resolution the better.

 

Thanks in advance.

Chip Taylor

Prepared Response, Inc

 

Reply | Threaded
Open this post in threaded view
|

Re: WMS Source for Orthoimages

Ed McNierney-4
Re: [UMN_MAPSERVER-USERS] WMS Source for Orthoimages Chip -

Well, I think ours is rather good <g>.  TopoZone provides WMS services for complete USGS DOQQ and High-Resolution Urban Area orthoimagery (topo maps, too).  All the imagery is uncompressed and is served at the full original resolution, in the full original color depth (black and white, true color, or color infrared).  We serve the data in any popular projection, seamlessly across UTM zones, to a variety of clients.

This is a production-level imagery service, and is not free.  If you’re interested in more information, please contact me off-list.  I am not aware of any other free WMS service (other than TerraServer, that is) that provides DOQQ imagery on a nationwide basis.  There are some state-level services out there.

     - Ed

Ed McNierney
TopoZone.com


On 1/18/06 6:22 PM, "Chip Taylor" <[hidden email]> wrote:

Can anyone tell me a good WMS for Ortho imagery / DOQ besides Terraserver?  The higher the resolution the better.

Thanks in advance.
Chip Taylor
Prepared Response, Inc



Reply | Threaded
Open this post in threaded view
|

Re: Mapfile Snippet Library / Open Source Cartographic Elements

Flavio Hendry
In reply to this post by David Bitner
> that could be reused by others.  I am thinking things like Styles,
> Class Definitions, Font Files, etc..

we put samples and all kind of free font files on
http://umn.mapserver.ch ... feel free to grab it and put it anywhere.

ciao
flavio
Reply | Threaded
Open this post in threaded view
|

Terraserver Help needed

Chip Taylor
In reply to this post by Ed McNierney-4
Re: [UMN_MAPSERVER-USERS] WMS Source for Orthoimages

am having much trouble trying to integrate a WMS layer from Terraservice into my map file (straight CGI – no PHP).  If someone has an example Map File where a DOQQ layer from Terraserver is used and could post it I’d be most grateful.

 

Chip Taylor

Prepared Response, Inc

 

Reply | Threaded
Open this post in threaded view
|

Re: Mapfile Snippet Library / Open Source Cartographic Elements

David Bitner
In reply to this post by Flavio Hendry
Flavio --

I love the font files!  Do you mind if they are also modified.  I'd
love to use those fonts as the basis for some multi-color symbols (ie
an interstate shield would use the existing shield that you have in
white and then would add a symbol for the red and a symbol for the
blue).

David
On 1/19/06, Flavio Hendry <[hidden email]> wrote:

> > that could be reused by others.  I am thinking things like Styles,
> > Class Definitions, Font Files, etc..
>
> we put samples and all kind of free font files on
> http://umn.mapserver.ch ... feel free to grab it and put it anywhere.
>
> ciao
> flavio
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Terraserver Help needed

Dylan Keon-3
In reply to this post by Chip Taylor
On 01/19/2006 05:51 AM Chip Taylor wrote the following:
> am having much trouble trying to integrate a WMS layer from Terraservice
> into my map file (straight CGI – no PHP).  If someone has an example Map
> File where a DOQQ layer from Terraserver is used and could post it I’d
> be most grateful.

Chip,

This layer is still working for me:
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0406/msg00237.html

If you need the full mapfile, let me know.

--Dylan