Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I apologize in advance if my question is unclear - I am afraid I do not understand all of this quite well enough to form my question precisely, but I will give it a shot.

I recently managed to get an OpenLayers map set up and displaying a WFS layer (mostly by piecing together examples from others' questions), the data for which is stored in a PostGIS database and served with GeoServer. My next task is to figure out how to connect the map to our existing database, which is an Accumulo database. We have a Jetty server set up for communicating with the Accumulo database. To the best of my knowledge, what I want to do is to replace the WFS protocol on my vector layer with a different protocol that will communicate with this Jetty server. If we can get a request sent to the Jetty server in some easily parsed format, we already have the capability to turn this into a database query and return JSON with the results of the query.

I have looked at both the HTTP and Script protocols, and it seems to me that one of these may be what I want to use. However, Google searches provide little in the way of examples of how these protocols work.

Am I on the right track with this?

Thanks,

-Rob

share|improve this question
    
" I want to do is to replace the WFS" Openlayers needs this to work (or WMS,GeoJSON,KML) - load the Accumulo DB data into PostGIS and keep the current process intact. –  Mapperz Dec 14 '12 at 17:10
1  
It appears to me that you want to take data from a non WFS service and display the data with OpenLayers. If so, you do not need to use a WFS layer at all. You can just query back the data as json and create the graphics on the client side using javascript. I will have to look for some examples and I will update. Did I understand this correctly? –  Jamie Dec 14 '12 at 19:06
    
I suppose to be more precise, I am using a Vector layer with a WFS protocol. I imagine that I will want to continue using a Vector layer, since much of the functionality I have established appears to depend on being able to select features, but I may be wrong. –  robc89 Dec 14 '12 at 21:03
add comment

1 Answer

up vote 1 down vote accepted

We had a similar issue and ended up building WMS and WFS plugins for Geoserver that are backed by Accumulo. I'd highly recommend going this route as you'll open up your data to any OGC compliant mapping client like OpenLayers, Google Maps, etc. However, if that's not an option, you can convert your data to GeoJSON via a web service (running in Jetty, perhaps), consume via js in the browser, and use the OpenLayers API to programmatically add those vectors to a Vector layer. See the docs, especially the addFeatures method.

share|improve this answer
    
Hi Anthony, I ended up following the second option (converting the data to GeoJSON, etc). Now that I have a better grasp on what I'm doing, I was wondering if you could elaborate a bit on building the WMS and WFS plugins. What, roughly, would that entail? Right now I have my data stored in an Accumulo database. OpenLayers sends a request with the bounding box to my web servlet, which queries the Accumulo database and returns GeoJSON, which is then used to populate a vector layer. I am now interested in overlaying a heat map using tiles, and from what I understand WMS would be useful. –  robc89 Jul 22 '13 at 21:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.