Скачать презентацию Implementation of an Open-Source Internet Map Server Lowell Скачать презентацию Implementation of an Open-Source Internet Map Server Lowell

2b759b2bf3b62778209a640853604618.ppt

  • Количество слайдов: 21

Implementation of an Open-Source Internet Map Server Lowell Ballard Virginia Economic Development Partnership Implementation of an Open-Source Internet Map Server Lowell Ballard Virginia Economic Development Partnership

Topics to be Covered • • • Overview of “Map. Server” Various methods to Topics to be Covered • • • Overview of “Map. Server” Various methods to implement Map. Server The Implementation at VEDP The gory details Comparison to other Internet Map Servers What you should consider when choosing an Internet Map Server

Map. Server Overview • Map. Server is an Open. Source development environment for building Map. Server Overview • Map. Server is an Open. Source development environment for building spatially enabled Internet applications. • The Map. Server was originally developed by (UMN) For. Net project in cooperation with NASA and the Minnesota DNR • Current development is funded by the Terra. SIP project, a NASA sponsored project between the UMN and consortium of land management interests. • Map. Server will run where most commercial systems won't or can't, on Linux/Apache platforms. • Map. Server is known to compile on most UNIXes and will run under Windows NT/98/95/00.

Map. Server Implementation Options • Map. Server can be implemented as a CGI application. Map. Server Implementation Options • Map. Server can be implemented as a CGI application. • The Map. Server CGI application provides a significant number of "out-of-the-box" features. • • • • vector formats supported: ESRI shapefiles, simple embedded features, ESRI Arc. SDE raster formats supported: TIFF/Geo. TIFF, GIF, PNG, ERDAS, JPEG and EPPL 7 quadtree spatial indexing for shapefiles fully customizable, template driven output feature selection by item/value, point, area or another feature True. Type font support for tiled raster and vector data (display only) automatic legend and scalebar building scale dependent feature drawing and application execution thematic map building using logical or regular expression based classes feature labeling including label collision mediation on-the-fly configuration via URLs on-the-fly projection

Map. Server Implementation Options • Map. Server system supports Map. Script which allows popular Map. Server Implementation Options • Map. Server system supports Map. Script which allows popular scripting languages such as Perl, Python, Tk/Tcl, Guile and even Java to access the Map. Server C API. • This is analogous to Active Server Pages (. asp) and Cold. Fusion (. cfm) in the Closed. Source world. • Map. Script provides a rich environment for developing applications that integrate disparate data. • If the data have a spatial component, and you can get to it via your favorite scripting environment, you can map it. • Additionally Map. Script allows you to integrate your business data in an RDBMS (e. g. , Oracle, My. SQL, Sybase) into your Map. Server application.

Map. Server Implementation Options • In addition, there is now a PHP/Map. Script module Map. Server Implementation Options • In addition, there is now a PHP/Map. Script module included in the current release. • This provides a powerful Open. Source alternative to. asp, . cfm and other server-side scripting languages. Example 1: HTML alone Hello, World! Example 2: PHP code alone Example 3: PHP embedded within HTML World!

Implementation at the VEDP • We have used the CGI version for the past Implementation at the VEDP • We have used the CGI version for the past year. • Recently we added a PHP version. • Both are linked from the main page of http: gis. vedp. org

The Gory Details - CGI MAP FILE ------Contains the basic configuration for the map The Gory Details - CGI MAP FILE ------Contains the basic configuration for the map service: Layers Image output directory Projections Image Size Symbology Legend properties Scale bar Property References Generates and returns images TEMPLATE FILE(s) ------Contains the code to create the map interface: HTML Java. Script Layers list Zoom buttons Tables Image, legend and Scale bar placement Submit form Map. Server CGI ----------Compiled to support Various functionality needed: SDE Map. Info support png, gif, jpg True. Type fonts Calls

. map File Example NAME DEMO STATUS ON SIZE 600 500 FONTSET /usr/local/apache/htdocs/vedp_maps/fonts. list . map File Example NAME DEMO STATUS ON SIZE 600 500 FONTSET /usr/local/apache/htdocs/vedp_maps/fonts. list SYMBOLSET symbols/symbol. sym EXTENT -400000 50000 400000 UNITS FEET SHAPEPATH "data" IMAGECOLOR 255 255

. map File Example - simple LAYER NAME counties TYPE POLYGON DATA county STATUS . map File Example - simple LAYER NAME counties TYPE POLYGON DATA county STATUS ON CLASSITEM tile_name LABELITEM "name“ SYMBOLSCALE 1500000 LABELMAXSCALE 600000 HEADER county_header. html CLASS NAME "Counties“ EXPRESSION /. / OUTLINECOLOR 128 128 COLOR 245 240 219 TEMPLATE county. html LABEL SIZE 8 MINSIZE 2 MAXSIZE 8 COLOR 0 0 0 BACKGROUNDCOLOR 255 204 BACKGROUNDSHADOWSIZE 4 4 BACKGROUNDSHADOWCOLOR 0 0 0 TYPE TRUETYPE FONT tahoma ANTIALIAS BUFFER 1 END END #Layer name #shapefile name #for queries use this #label using this item #Start scaling at this resolution #Start labeling at this scale #Header template for queries #Start of a map class #Name for Legend #could be pop 90 > 10000 e. g. #used to build query output #Builds the label

. map File Example – multiple classes CLASSITEM . map File Example – multiple classes CLASSITEM "ROAD_TYPE" CLASS EXPRESSION "1" COLOR 0 0 0 SYMBOL 'symbols/images/interstate. png' LABEL SIZE 2 MINFEATURESIZE 40 MINDISTANCE 150 POSITION CC SIZE TINY COLOR 255 255 END CLASS EXPRESSION "2" COLOR 0 0 0 # dummy color SYMBOL 'symbols/images/ushwy. png' LABEL MINFEATURESIZE 50 MINDISTANCE 150 POSITION CC SIZE TINY COLOR 0 0 0 END

. map File Example - Raster LAYER NAME spot 2001 TYPE RASTER STATUS OFF . map File Example - Raster LAYER NAME spot 2001 TYPE RASTER STATUS OFF TILEINDEX spot_2001/spotindex TILEITEM "LOCATION" MAXSCALE 25000 MINSCALE 3000 OFFSITE 0 END

The Gory Details • The hardest part is the compilation process. • Because it’s The Gory Details • The hardest part is the compilation process. • Because it’s open source it pulls from many different projects with many different developers. • If you need support for something (e. g. , True. Type fonts) it has to be compiled in (e. g. , Free. Type). • This can be a pain. • However, installation of most IMServers is a pain.

Subset of Compilation Options • • • • • • --with-gd[=[static, ]DIR] Specify which Subset of Compilation Options • • • • • • --with-gd[=[static, ]DIR] Specify which version of GD to use (DIR is GD's install dir). --with-freetype=DIR Specify where Free. Type is installed (DIR is path to Free. Type 2. x freetype-config program or Free. Type 1. x/2. x install dir). --with-zlib=DIR Specify where zlib is installed (DIR is path to zlib install dir). --with-png=DIR Specify where PNG is installed (DIR is path to PNG install dir). --without-tiff Disable TIFF support. --with-tiff[=DIR] Include TIFF support (DIR is Lib. TIFF's install dir). --without-eppl Disable EPPL 7 support. --with-eppl Include EPPL 7 support. --with-proj[=DIR] Include PROJ. 4 support (DIR is PROJ. 4's install dir). --with-sde[=DIR] Include ESRI SDE support (DIR is SDE's install dir). --with-sde-version[=VERSION NUMBER] Set ESRI SDE verion number (Default is 80). --with-mpatrol[=DIR] Include MPATROL support (DIR is MPATROL's install dir). --with-ogr[=DIR] Include OGR support (DIR is OGR's install dir). --with-gdal[=DIR] Include GDAL support (DIR is path to gdal-config --with-postgis[=ARG] Include Post. GIS Support (ARG=yes/path to pg_config) --without-wms Disable OGC WMS Compatibility (enabled by default). --without-wmsclient Disable OGC WMS Client Connections (enabled by default).

Comparison--Speed • Map. Server is faster • I compared Map. Server running on a Comparison--Speed • Map. Server is faster • I compared Map. Server running on a PII Desktop with 128 MB RAM to another IMS running on a PIII 512 MB RAM Server. • CPU usage for Map. Server was about 20% per map rendered and took about 1 second. • CPU on other IMS took about 8 -10 seconds and 100% CPU utilization.

Comparison--Support To: mapserver-users@lists. gis. umn. edu Subject: [mapserver-users] mapraster. c compile error--- From: Comparison--Support To: mapserver-users@lists. gis. umn. edu Subject: [mapserver-users] mapraster. c compile error--- From: "Ballard, Lowell" Date: Mon, 20 Aug 2001 10: 45: 56 -0400 I've tried compiling nightly with several options and I always get the same parse errors. -------------------- gcc -c -O 2 -Wall -DIGNORE_MISSING_DATA DUSE_EPPL -DUSE_TIFF -DUSE_JPEG -DUSE_GD_GIF -DUSE_GD_SWAP_XY -DUSE_SDE -I/home/baldur/mapserver/. /gd-1. 2/ I/home/baldur/mapserver/. . /sdeexe 81//include mapraster. c -o mapraster. o ====================== To: "Ballard, Lowell" Subject: Re: [mapserver-users] mapraster. c compile error--- From: Daniel Morissette Date: Mon, 20 Aug 2001 11: 04: 40 -0400 CC: mapserver-users@lists. gis. umn. edu References: <509989 F 9 E 1 D 38 D 47 ADA 73 ED 9 CF 5 BF 32 A 16 CEDD@communications> > I've tried compiling nightly with several options and I always get the > same parse errors. > mapraster. c: In function `ms. Draw. Raster. Layer': > mapraster. c: 1698: parse error before `{' It's a typo related to a change I made last week. It was a missing bracket inside an #ifdef'd case that was never compiled in my case. I've committed a fix, so please do a CVS update and try again.

Comparison--Support • The List. Serv is very active and very responsive • Messages are Comparison--Support • The List. Serv is very active and very responsive • Messages are archived and searchable • I usually get a response to my problem in in hour or less

Comparison—Cost • • Map. Server is completely free. It is free from cost You Comparison—Cost • • Map. Server is completely free. It is free from cost You are free to modify the source code As people make changes or develop enhancements they are committed to the development tree. • This is how the product grows so rapidly

Recent Developments • Major advancements in Web Mapping Services. • Ability to handle. axl Recent Developments • Major advancements in Web Mapping Services. • Ability to handle. axl requests from Arc. GIS

What to consider • • • Your “Need for Speed” Your in-house abilities Database What to consider • • • Your “Need for Speed” Your in-house abilities Database connectivity GIS data formats Your budget

Resources • http: //gis. vedp. org (“about this site” link) • DM Solutions (PHP Resources • http: //gis. vedp. org (“about this site” link) • DM Solutions (PHP Map. Script) (http: //www. dmsolutions. on. ca/) • Apache. Toolbox (http: //www. apachetoolbox. com) • Google (http: //www. google. com) which runs on a Linux cluster .