Her er stumperne til din egen mashup applikation ...
Mash your own applications ...
Summary: Map-based mashups abound these days. Mashups require services that can be mashed up. Location-based mashups need services that provide boundary information. With Web-based mapping providers, you can easily create a map-based mashup with little or no capital investment. In this article, learn how to create a KML boundary service from an ESRI shapefile to be used in mashups.
Map-based mashups are omnipresent nowadays, largely because services that can be mashed up are widely available. For a map-based mashup, you need services that provide cartographic boundaries. The U.S. Census Bureau releases data on state, county, and ZIP code boundaries in Environmental Systems Research Institute (ESRI) shapefile format. In this article, learn how to create a simple service to deliver KML files from ESRI shapefiles using open source software.
There are many tools and products, both commercial and open source, that you can use to work with spatial data and create mashups. The example in this article uses open source software: PostGIS as the database, GeoTools Java™ library, the OpenLayers mapping library, and Apache Tomcat as the application server.
- A spatial extension to the open source relational database PostgresSQL. PostGIS supports spatial data types and functions as described by the OpenGIS Simple Features Specification for SQL standard.
- A Java library to perform manipulation of spatial data. GeoTools includes:
- Support for various spatial data formats (such as ESRI shapefile, Geography Markup Language (GML), MapInfo Interchange Format (MIF)), and spatial transformations.
- Java Topology Suite (JTS) from Vivid Solutions that defines Java classes to represent spatial data.
The example solution uses GeoTools for spatial transformations and JTS for converting the binary large object (BLOB) data from the database to a geometry.
- Apache Tomcat
- An open source J2EE JSP and servlet container used in the example to deploy the service.
This section explains what you need to prepare to create the example application in this article.
Figure 1 shows the logical architecture of the example solution.
Figure 1. Logical architecture