Tag Archives: GeoServer

GeoSandbox grows up to be a “Real boy”

A quick update on the status of my little experiment.

This morning I got it in my head that I wanted to access my GeoSandbox in ArcMap through WMS, and allow others access to it through the same mechanism. Through much trial and error, and some timely help from @mcbride_bryan, I was able to accomplish my goal. If you want to try loading any of the data on my GeoSandbox into your GIS client of choice, you should be able to do so through this URL:

http://donmeltz.dyndns.org:8080/geoserver/wms?service=wms&version=1.1.1&request=GetCapabilities

Here’s a screen-shot with all the current layers loaded:

GeoSandboxWMSinArcGIS

Thanks also to @tpstigers for verifying that he could access it in his GIS app of choice, QGIS running in Ubuntu:

GeoSandboxWMSinQGIS

I’m really surprised at how fast these layers load. They seem to load much faster through the WMS than they do in the webpage.

So, I am happy to report that my little GeoServer toy is well on its way to becoming a “Real Boy”

Setting up my GeoSandbox

It’s been 3 weeks since I set up my little GeoServer experiment and started populating it with various datasets. I thought I’d outline the things I’ve been working on, and what I plan on looking at next. I couldn’t have come as far as I have without the generous help of some of my Twitter friends. I’ve noted below each section those who’ve helped me out. I apologize if I’ve overlooked anyone.

Workspace > Store > Layer

My initial step in getting a useful map up and running was to load some vector data. The first thing I’m sure every GeoServer noob learns is, importing data into GeoServer is a three-step process. The first thing I did was set up a Workspace, which is essentially a folder in my “C:Users<username>.opengeodata_dirdata<foldername>” directory. Then I told GeoServer where to look for this folder. Second step was to set up a Store. A Store can hold a single layer, or multiple layers depending on how you import the data. Why a Workspace AND a Store? I have no idea, but that’s what you have to do, so that’s what I did. Third step was to add a layer or layers to the Store. After that, you can add those layers to a GeoExplorer map, and publish it or embed it in a webpage.

EPSG

Somewhere along the way, GeoServer will ask for a spatial reference system (SRS) for the data you’re adding in the form “EPSG:XXXX”. I figured out very quickly that looking up the EPSG for a shapefile using the built-in GeoServer tool is a PITA. A couple of tools were pointed out to me:
Prj2EPSG (http”//prj2epsg.org/search) and Spatial Reference (http://spatialreference.org)
Although the data I use comes to me in many different projections, I use a limited number of spatial references in my output. I now keep a Post-It note on my desk with the 5 EPSG codes I use most often.
(Thank you @mcbride_bryan, @spara)

Styling

Symbolizing vector layers in GeoServer is a little cumbersome, but I was able to figure it out. and it’s not too much of a chore for simple layers. Options are limited, and I’ve been pointed to a few other tools when it comes to styling layers. uDig, Atlas Styler, and Arc2Earth all look promising and I’ll be checking them out in the near future.
(Thank you @mcbride_bryan, @spara)

Rasters

One of my more frustrating episodes was an attempt to get raster data to display in my GeoExplorer map. The GeoServer GUI and documentation led me to believe I could just load an ArcGrid (binary) dataset into GeoServer. I wasn’t able to get that to work, and have been told by some that it’s not supported. Next, I tried a jpeg. I assumed by including a world file (jgw) everything would be hunky-dory. I assumed wrong. It was pointed out to me that a projection file (prj) needs to be included, too. That got the raster to display, but brought my poor little server to its knees. Finally, I settled on a GeoTiff. By using jpeg compression within the GeoTiff, I was able to keep the file size reasonable, and GeoServer handled it just fine.
(Thank you @geowolf, @storm72)

Zoom Levels

For the life of me I could not figure out how to zoom in close enough to make my newly loaded raster data useful. I know I had seen many GeoServer/GeoExplorer maps able the zoom in nice and close, but it just wasn’t happening for me. Finally, it was pointed out that changing the default base layer to something other than Google Terrain fixes that problem. Worked like a charm. Why would the Google Terrain base map limit zooming in close? I have no idea. Just one of those things.
(Thank you @manicmapper)

HTML and CSS

After getting these things working, I decided to dress up the web page that holds my GeoExplorer map a little bit. I have Dreamweaver CS4, and I use that to manage a couple of websites, but it’s really much more than I need, especially for a little single page website. I looked around and found Aptana Studio. After using it for an hour or so, I’ve come to really like it. It color codes and formats the HTML and CSS so it’s readable, and I think the preview feature works better than what Dreamweaver has. I might also give Komodo Edit a try, and see how that compares.
(Thank you @mcbride_bryan)

What’s Next?

Probably some more experimenting with the various SLD editors, brushing up on my HTML and CSS skills, and diving into JavaScript, which I’m embarrassed to say, I haven’t really looked at in over 5 years.

What’s it look like?

Here it is as of January 31, 2011:

GeoSandbox 2011-01-31

And a link to the site so you can see it now:

Don’s GeoSandbox

Serving Maps for Free

The Goal

This weekend I started down the road to fulfilling one of my New Year Resolutions: Get some maps online. And by maps online, I don’t mean posting links to KML files, screen shots, or PDF exports from ArcGIS. I mean full-fledged interactive maps viewable by anyone with a browser. On top of that, I had one more goal. I wanted to do this with as little extra cost to me as possible. This is going to be a learning experience for me, not a paying job.

The Map Server

I’ve put a lot of thought into this. It’s something that’s been on my mind for a long time, and I’ve looked into a few options. Choosing a map server was relatively easy. There appear to be three major players in the map server arena. ESRI’s ArcGIS Server, GeoServer, and MapServer. There are others mentioned on Wikipedia’s Web Map Service page, but these are the three that seem to be discussed most often.  ArcGIS Server was out of the question for obvious reasons. Thousand$ of obviou$ reason$. GeoServer and MapServer are two Open Source options, but GeoServer seems to be the more popular option among the open source crowd. I’m not one to pick an option basedGeoServerStatus solely on its popularity, but in this case, popularity also means more discussion in the forums, which in turn means it’s easier to find a solution to any problems that might arise during my own learning process. So, GeoServer it was. You can download GeoServer directly from GeoServer.org, but I decided to go the OpenGeo Suite Community Edition route. What led me to that decision was their great White Paper on The OpenGeo Architecture, which is the most concise, easy to read explanation of how all the pieces fit together that I’ve found anywhere on the web.

The Web Server

The most difficult decision in this whole process was how to host this beast. Yes, I know, I could just install GeoServer on my laptop and play with it there, but I wanted to make these maps public. Isn’t that the whole point of a server, be it geo or otherwise? I have been looking at Amazon Web Services, and signed up for a AWS Free Usage Tier account when they started offering them. The problem with AWS is, it’s just so darn complicated to get IIS7Managersomething set up. I am getting better at finding my way around there, but I still get lost once in a while. Plus, the free accounts require using a Linux operating system. I’ve been experimenting with Ubuntu at home, but I’m much more comfortable working in a Windows world. And Windows usually means paying for cloud computing space (e. g. $58/month at Rackspace). If you’re interested in looking at the AWS option, I highly recommend you take a look at what @spara has done: Install GeoServer on Amazon EC2 without leaving the browser.

The Home Server

I decided to merge this project with another I’ve been thinking about for some time now: setting up a home-based web server. I have an old Dell 600m laptop that’s just taking up space in my office. I have an extra copy of a Windows 7 Home Premium upgrade disc that comes with IIS7. Both were essentially free (to me anyway, your costs may vary). MyHomeWebServerThe only unknown was, would I be able to open this up for public viewing? The main roadblock to setting up a public server using a home internet connection is the use of dynamic IP addressing and port blocking by some (most?) ISPs. I was able to work around both of these obstacles by using DynDNS’s services, and setting my router and software settings appropriately. I wont go into the intricacies here, but if you do a Google search on either of these terms, a wealth of information will flood your browser.

the steps I followed to get things up and running:

  • Wiped the hard drive on the Dell 600m laptop clean
  • Installed the original XP OS, and then the Win 7 Home Premium upgrade
  • Installed all updates through Windows Update
  • Downloaded and installed the OpenGeo Suite
  • Played around with GeoServer and GeoExplorer enough to get a basic map embedded on a web page
  • Got a free Dynamic DNS host name at DynDNS.com
  • Installed DynDNS Updater
  • Modified my router settings to make sure the proper ports were open and forwarding to my laptop server
  • Tested, changed settings, tested, changed settings, tested, tested, tested
  • Scratched head, changed settings, tested, swore a few times, had a beer…
  • Installed and set up Internet Information Services (IIS7)
  • Set up a website using the web page with the embedded map I made with GeoServer/GeoExplorer
  • Went through the whole “testing-scratch head-drink a beer” routine again
  • Celebrated the results

Here’s a snapshot of the results on day 1:

Don's GeoSandbox RC1

And a Link to  what it looks like now:

Don’s GeoSandbox

I’ll try to keep this link up-to-date, but this is all a test, and it is running on a home computer, so don’t be surprised if it’s not available 24/7.
Some of you that have seen this before this post asked the question”Great, but where’s the data?”
Well, that’s coming. Please be patient with me people :-). Baby steps. Baby steps.

Addendum 01/12/2011

I now have a few shapefiles uploaded and viewable on the site. Next step will be to dress up the web page a little bit.