20

I am interested in developing a web-mapping application. I am relatively familiar with Python and so i'm looking for a python framework. What are my options? what are the pros and cons of each option?

I am looking for a simple option, one that displays the geographic information on the map and lets the user use "info" to get more details. At this point i don't need any queries or dynamic functionality. I would prefer a well-documented option.

1
  • 4
    You need to provide more information. What features are you looking at? What kind of web mapping do you want to do? Nov 26, 2013 at 4:10

4 Answers 4

15

Try Folium, it's really simple to get started: you create your project using Python and you just open the resulting map.

If you want to go deeper, you can sort by descending level of simplicity:

  • GeoDjango with additions like Django-Leaflet. Really best doc here
  • FeatureServer More server side oriented but an OpenLayers demo (last updated 2015)
  • MapFish alone. Based on now outdated Pylons (last updated 2011)
  • Papyrus, the Mapfish integration in Pyramid, a well-known Python framework (last updated 2017)
2
  • How does Folium compare with GeoDjango in terms of the capabilities they have? Jul 18, 2015 at 15:22
  • 2
    Folium = mainly for previewing data in a web map and generate static web map. No editing capabilities here. On the other side, GeoDjango = to manage data in a dynamic web site. You will need to code more but you can make a full web site as GeoDjango is only and extension to the Django web framework (to create full website). Editing abilities available, managing users and groups is also possible too.
    – ThomasG77
    Jul 19, 2015 at 0:12
8

You could try GeoDjango .

It might be overkill for what you want to do but it seems to meet the criteria you are looking for. It's a python driven web framework that incorporates a lot great GIS projects like, gdal/ogr, OpenLayers, and supports the use of geodatabases including postgis/postgres.

I've been experimenting with it off and on for a few months and like it so far. There is definitely a learning curve, but the documentation is fairly good and there is a strong user community.

I find that it's a really flexible platform and more mature than I was expecting it to be. Have a look if you haven't already.

8

If you want basic webservice in python, there is two way :

  • geodjango, this is an official extension integrated in django. It works great but it's django centric. If you like django it's perfect
  • flask (or an another webframework) + geoalchemy2 (extension of sqlalchemy) + shapely (lirairy for manipulating Geo-object) , maybe it's harder than geodjango but it's my favorite solution. I prefer jinja2 and sqlalchemy than django's template and orm.

Then plug it to openlayers or leaflet.

But look at standard solutions WMS or WFS server, it can be helpful.

0

How's about MapFish, which according to itself is

a flexible and complete framework for building rich web-mapping applications ... based on the Pylons Python web framework.

Can't claim to have used it but it is pre-installed on my OSGeo Live machine - OpenLayers and TileMill have been my web mapping 'frameworks' (whatever that means) of choice, but neither use much Python. Based on their website and their affiliation with OSGeo I would not hesitate to recommend testing their technology although as the comment above says, your choice should depend on application, not just what language it's written in.

Their online demo seems to work efficiently and it seems like a project with momentum: why not give their 'quickstart' tutorial a try and see how well it matches your needs?

1
  • 2
    Mapfish is no longer active.
    – raphael
    May 10, 2017 at 20:07

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