The GIS Forum
The GIS Forum is a community site for Spatial users to connect and grow

Open source GIS questions from a newbie

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 12 Replies | 6 Followers

Top 150 Contributor
Male
2 Posts
Andrew Smith posted on 03-05-2009 8:44 PM

Hello all,

Just joined tGF as this seems to be one of the few GIS forums available on the web where there is some activitiy going on. Let me preface what I'm about to ask/ramble on about by saying that I have absolutely no GIS experience. Please excuse my lack of knowledge if I don't use the correct terminology in certain places.

The company that I am working for is embarking on a new venture which involves writing a web-based application to show GIS maps (as well as other non-GIS based data).  This will be a closed-off system (accessible via intranet only) so won't have access to any publicly accessible web map services.  Basic functionality will include things like:

-standard zoom/pan functionality
-ability to measure distance between two points
-ability to select an area on the map and get a listing of all 'assets' (for want of a better word) that reside inside that area
-ability to annotate maps with placemarks/notes (a la google maps)
-ability to dynamically add/remove objects on maps based on an event happening elsewhere (e.g. if a power failure is detected at a factory downtown, an icon should automatically appear above that factory on the map)

We plan on writing this app using ASP.NET and interacting with an SQL Server 2008 db which will store all of the non-GIS type information.

The main problem is that the software can't be tied to any particular GIS package. Our initial client is currently using ArcIMS, but we can't build our software using ArcIMS or ArcServer or anything that is tied to a particular GIS brand. The software needs to be smart enough to provide all the functionality listed above regardless of the underyling GIS package used by the client.

My limited understanding of GIS web applications is as follows (please correct me if I have something wrong):

1. I need a UI layer to draw the objects in the browser and handle user events like zoom, pan, annotate, etc. OpenLayers seems to be the leader here in terms of open source solutions.

2. I need a map server to get the geospatial data from somewhere and render some images to display in the browser. Examples include Mapnik, MapServer and GeoServer.

3. I could optionally implement a tile cache server which will sit between the UI layer and map server layer and provide map tiles from a cache, thus potentially speeding up the map display. Examples include TileCache and GeoWebCache.

I have the following questions:

1. Should I be going down the free path or trying to buy some components that will do what I'm after?  I found AspMap (www.vdstech.com) and MapDotNet (www.mapdotnet.com). The examples that I saw on the AspMap website didn't look all that good (doesn't seem to produce tiles, just one big image), but that may just be due to poor implementation.  The MapDotNet site looks very promising and the examples are pretty slick, but the price could rule it out - $US3800 per server is pretty expensive.  I'm leaning towards open source for all GIS components at this stage.

2. Assuming that I'm using OpenLayers, what does everyone recommend in terms of a map server?  I've read good things about how good Mapnik's rendered maps look, but MapServer seems to get better kudos for its documentation and configuration/ease of use. Any thoughts on this?

3. Same question as above for tile cache software?

4. How should I be getting my data out of the (possibly numerous) GIS systems running on each client so that the map server software can render it?  Do most GIS systems have the ability to export ESRI Shapefiles?  Or should I be setting up a PostGIS database and trying to export all of the data into that?  Or should I be thinking about using SQL Server 2008's spatial capabilities? 

5. How should I be storing the annotations that a user can make?  I could store a set of KML files and link them to each map - is that what is usually done?  I suppose if I have a PostGIS/SQL Server database I can put the data in there.

6. Any thoughts about creating SVG files and using those instead?  I believe I would need to convert the geometric data into a PostGIS db initially - I think it has the ability to return data as SVG files...and I could then use the built-in SVG rendering of the browser to draw the objects. I am not sure how this would look/perform as compared to a tile map of images - anyone have any experience with this?  I'm also not too sure whether I would then try to use the built in zoom/pan functionality of the SVG file, or whether I would still need to go back to the server/database every time the user performed an action.

Sorry for the long list of questions - any and all help is appreciated.

Andrew

All Replies

Top 10 Contributor
178 Posts

That's a heck of a first post, Andrew! It sounds like you've done a lot of research already and have a pretty good feel for what's available.  I would strongly encourage you to stick with the open source solution; $3800 per server will seem like a steal if you end up with enterprise licenses for each piece of this puzzle.

You're understanding of a GIS web app is correct. You need data stored, served, and rendered in a browser that can react to events. You may also need editing.

I would probably go with PostGreSQL/PostGIS, GeoServer, and OpenLayers because that's what I'm most familiar with. I don't know much about Mapnik, but I suspect better documentation will be better for you at this stage- especially if this is an internal app. Get something out there, and redo the front end if it needs it. Chances are you're internal users are going to be like most external web GIS users- they want simple, intuitive, and fast.

PostGIS is often chosen over other closed-source solutions on performance alone, nevermind the licensing. ArcServer offers more out of the box, but you pay for it, for ever. You've probably already poked around the internets for samples, but if not, look around and you should find some good examples of GeoServer OpenLayers. I can't recommend either caching service over the other, someone else will have to chime in.

As far as keeping vector layers verse all raster tiles will depend on what you need. You can't edit a road line if it's in a raster tile. Tiling will, obviously, limit the pull on your server, but will also limit the interaction to a certain degree.

Okay, somebody else pick up and do a better job than I can! Good questions Andrew!

 

Top 10 Contributor
Male
157 Posts

I completely agree with the combo that Dylan suggested. OpenLayers alone you can do most what you need to do. Look at some of the examples on the OpenLayers example page. The tricky part is to get your dynamic data to and from your server (or servers) so Geoserver and PostGIS can help you there and all for free! I recall the PostGIS "team" even mentioning some work that is being done on making its spatial queries orders of magnitude faster than in previous versions. As for building and deploying a decent tile cache without breaking the bank....there are a lot of ways to do it but unfortunately in my experience I have only ever used really expensive software BUT that might be what it takes so not to jeopardize the integrity of your raster data. You could give this script a whirl as it does claim to create the OSGeo-spec for tile services. I have used it before but it takes a really long time to run and gobbles up a ton of disc space for larger images!

Good luck,

Adam

Adam Estrada - The GIS Forum

Top 10 Contributor
Male
157 Posts

You've really got me thinking now...The Mapserver documentation is really good but how does it perform next to Geoserver? There are pros and cons to both applications. Check out this PPT does a good job in describing that.

 

 

Adam Estrada - The GIS Forum

Top 10 Contributor
59 Posts

I'm largely in agreement with Dylan and Adam on applications that would be well worth your while to look at. I'd just add that as far as a caching solution goes, I've used both TileCache and GeoWebCache. Both work very well, but as I recall it took a little more effort to install and correctly configure TileCache in comparison to GeoWebCache. GeoWebCache's integration with GeoServer makes it a breeze to use with minimal configuration if you go the GeoServer route. I'd highly recommend GeoServer + GeoWebCache for that reason alone. Good luck!

Top 50 Contributor
Male
7 Posts

Andrew,

Some really great input here as far as the choice of technology goes.  I have one thought, however.  Any time you are trying to decide on a technology it is very important to know what the desired results are; the information products as it were.  What do you need the user to have access to, how sophisticated will your audience be and so on.  All of this will have a bearing on what your choice of software stack will be.  Once you know what the output needs to be then you can look at software and decide which application(s) will meet these needs.

Just some food for thought.

Gerry

Top 10 Contributor
Male
58 Posts
Suggested by Terry

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Andrew -

 

My advice is to hire a consultant.  I say this not out of arrogance, but out of less-than-happy experience.  Judging by your post, I assume that you are quite capable of learning enough of what you need to learn to put together a product that would work.  However, being the result of a learning experience, it would probably be a high maintenance product.  Now – if the product in question is meant for use in-house by your company (I couldn’t determine this by your post), that might be fine, but if it was going elsewhere it could be problematic. 

On the other hand, If you hired someone who already has the skills you’re lacking (and who will work with you), the resulting product ends up being much more stable and robust, you end up learning as much (or more), and your company ends up consuming no more resources (probably less) than it would have if you took the time to learn it all yourself.  And you win either way – if the application is meant for in-house use, it ends up being easier for you to maintain.  If it’s going elsewhere, you get less tech support calls.  Not to mention the fact that you’d then be equipped to produce a similar product again, if need be.

 

Just my two cents.

I have an existential map:  It has 'you are here' written all over it.

Top 10 Contributor
Male
58 Posts

"Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4"

I have got to stop pasting crap into posts from Word.

Of course, "Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4" might make a good sig.

I have an existential map:  It has 'you are here' written all over it.

Top 10 Contributor
59 Posts

Terry, hiring a consultant is not a bad idea to be sure. I've looked into taking a similar path for some projects, but the issue I've run into, at least in my area, is that most of the GIS consultants who traditionally work in the region have little to no knowledge of open source GIS. I'm skeptical that the scope of the projects I have in mind would justify the cost of bringing in a consultant with open source experience from halfway across the country. I'm curious as to whether you or anyone else has had a different experience when it comes to consultants' background with open source applications and solutions.

Top 150 Contributor
Male
2 Posts

Thanks for the suggestions everyone - I'm glad I was able to come up with a post that could elicit such a response!

@Terry: A GIS consultant is not a bad idea, although I expect it'd be easier to find someone very familiar with open source solutions if I was in the USA (I'm working in Shanghai at the moment).  I will raise it with management and see what they think.  The product is not going to be used internally; it's being sold to customers so needs to be pretty solid and supportable.

@Gerry: The target users of this software will be a bit of a mixed bag.  Some of them will be familiar with full-featured fat-client GIS editing software, as they will be the ones that are responsible for creating/editing the drawings.  Others will have no experience with GIS at all, unless they've played with something like Google Maps in their spare time.  Many users will never do anything more than zoom/pan with this software, while others will make use of the more advanced features like adding markers and doing area analysis.  As long as OpenLayers/GeoServer/PostGIS can handle that (and it sounds like they can), I think we'll be able to come up with a solution that will meet the needs of our customers.

@Dylan, Adam and Roger: I like the idea of GeoServer and GeoWebCache being tightly integrated, so I think I'll start looking down that path.  Sounds like you guys also favour PostGIS over shapefiles too, which I have no problem with.  I guess I just need to look into ways of getting the existing GIS data into a PostGIS database, and I'm sure there's info out there which will help me do that.

Something else that's been bugging me: adding extra data to a map using OpenLayers.  I just don't understand how it works.  Take the example of a bus route. Let's say I have a map which includes all of the bus stations on a particular route.  This is obviously static geometric information.  To show it:

- OpenLayers makes the request to display it.
- GeoServer processes the geometric data from PostGIS db and sends back the tile map.
- OpenLayers displays the tile map.

I have a separate data source (SQL Server db) which contains dynamic data about each of the bus stops. This data includes the coordinates of each bus station and the number of people currently waiting for a bus (not really a valid real-world situation, but let's run with it anyway). 

I assume I can use OpenLayers to query this data and display it on the map.  My understanding is that this would completely bypass GeoServer as it is not asking for vector/geometric data.  OpenLayers makes the request via a web service, gets the data back, and displays it on the screen. Since it knows the coordinates of each bus station, it knows where to draw the data on the screen.  Correct?

Now the user zooms in. OpenLayers sends a request through to GeoServer to ask it to regenerate the tile map at the new zoom level. Does it also need to re-get the passenger data and draw that again at the new on-screen location, or is that handled automatically when a zoom or pan is performed?  Or am I completely barking up the wrong tree and need to consolidate all of my 'additional' data in the PostGIS database for GeoServer to work with?

Top 10 Contributor
59 Posts

Andrew, I'll give your separate data source scenario some more thought. However, my first inclination is that it would probably be easiest, as you mentioned, to consolidate the data from the SQL Server database in the PostGIS database.

You were wondering how to get the data into PostGIS. Fortunately, there is an open source library called OGR that does a remarkable job of converting vector data between many different formats. As alluded to on the OGR website, the easiest way to get the OGR utilities in a ready-to-use form is to download the FWTools kit. You'll want to use the ogr2ogr utility to do the conversion, and research the particular syntax of the data formats you're dealing with on the supported formats page of the OGR website. I know from firsthand experience that the OGR syntax can be a little tricky at first, so please let us know if you have any questions or need any pointers.

Top 10 Contributor
Male
157 Posts

I have used the command line tool called shp2pgSQL that ships with PostGIS to convert a shapefile to a standard SQL script. This allows you to have more control over the vector object before running the SQL INSERT statment in PostgreSQL. The guys at Refractions wrote this tool so I trust it more than the OGR implementation. With that said, they are both going to adhere to the OGC specification so I guess it's just a matter to preference for which one to use. There are numerous apps out there that write data to and from PostGIS. It's all just preference as to which one you will want to use.

Also, I just came across a really good spatial database comparison chart I think folks will be interested in looking at. 

Enjoy

Adam Estrada - The GIS Forum

Top 10 Contributor
Male
157 Posts

I just stumbled across this Twitter post about a group that ported the javascript API for OpenLayers to ActionScript 3.x. You can build really cool mapping apps quickly and easily using the Adobe Flex Builder. Check out FlashEarth too as this guy is an ActionScript expert and has really done a great job with his flash-based site!

Adam Estrada - The GIS Forum

Page 1 of 1 (13 items) | RSS
Bookmark and Share
Creative Commons License

PLEASE SEE THE THE LICENSE FROM THE ORIGINAL SOURCE FOR ALL POSTS PULLED INTO THE COMMUNITY MASHUP BLOG SECTION