Shapely 1.0.7

Version 1.0.7 fixes problems with polygon ring dimensions and reference cycles. Related: I fixed the only known Rtree bug and am lobbying hard to push it ahead to 1.0.

Better

This is better, as I was saying. It's nice to see Python catching on in my home state's GIS department, and also to see ESRI users catching on to the power of more idiomatic Python. It's more than just an open source Avenue, after all.

Speaking of better Python things, yesterday I found out about Tarek Ziade's Atomisator project. It's the kind of framework for feed processing that is entirely lacking in my Mush application. A comment on his entry then led me to TOPP's Melkjug, which has a slick web UI for creating feed filters that is also not to be had from Mush. I think I'll borrow liberally from each, and maybe Mush can provide some geographic processing and filtering inspiration in return.

Easier

Mateusz's post about marshaling geometries from hex-encoded WKB strings in C++ reminds me how easy this is in Python using built-in string methods and Shapely:

>>> from shapely.wkb import loads
>>> g = loads('01010000005839B4C876BEF33F83C0CAA145B61640'.decode('hex'))
>>> g.wkt
'POINT (1.2340000000000000 5.6779999999999999)'

My only regret about switching to dynamic languages for (almost) all my development is that I didn't go straight to Python. Last weekend I ran into a former co-worker at the Fort Collins downtown street festival and was reminded about the enormous Perl legacy I left behind at that shop.

Comments

Re: Easier

Author: Mateusz Loskot

Sean, Nice reply to my post. Yes, indeed Python language, or more accurately - framework, simplifies things a lot. And, Shapely makes geo-things yet more simpler. To explain my favorite programming language away ;-) I can only say that C++ language and standard library provides implementation of a basic set programming concepts and all the rest is left to a programmer :-)

Re: Easier

Author: Sean

Thanks for having a sense of humor about my Python enthusiasm, Mateusz.

Mapping McCain's homes

Speaking of maps in the media -- I like this one of John McCain's homes:

http://www.washingtonmonthly.com/blogphotos/Blog_McCain_Homes.jpg

I know he doesn't personally use the internet tubes, but maybe an aide can print it out and help McCain keep track of these places.

Does this kind of "attack map" contribute to the stupefication of US politics? Yes, perhaps, but I for one am happy to see the other side get the rare pleasure of defending itself from this kind of bullshit. For once.

Comments

Re: Mapping McCain's homes

Author: Andres

Awesomeness. Thanks for sharing this! I'm booking a spa vacation at the compound right now,

Re: Mapping McCain's homes

Author: Sean

Book with care. John McCain, as a former POW, has the right to modify the terms at any time.

Re: Mapping McCain's homes

Author: KoS

Wow...you don't get out much if you think one side slings all or most of the mud. Need to diversify your readings. How do we know those are "his" places? They could be all "her" places. KoS

Re: Mapping McCain's homes

Author: Sean

Yes, I do expect that he'll try to duck behind his second, much younger, heiress wife -- for whom he dumped his not rich and no longer young, first wife. Good strategy? I don't know ... pass the popcorn!

Re: Mapping McCain's homes

Author: carl

Did you all forget we are Capitalists? Since when is makeing money a crime? The other thing is there is no way to tell what happened in the first arriage, they were not married that long, and then the terrible seperation, the POW camp and an accident for the other..who knows how any one of us would react...and who knows what's in a marriage. The fist wife still thinks alot of him...how often does that happen. I'm not saying vote for him for any of these reasons...but you can't use that as a basis not to...not if you are a fair minded person. I think we need to choose on substance...not anything else...and there is no need to hate, just because someone is an opponent. This seems to go against the Dem principals. and no..since Hillary is gone I have not made up my mind...still hoping she's the VP...that would change things.

Re: Mapping McCain's homes

Author: Sean

Choose on substance! What, are you from a parallel universe where Gore was elected in 2000? This universe doesn't work like that.

Re: Mapping McCain's homes

Author: Sean

KoS, this isn't a toilet for anonymous cowards. I'm exercising my comment policy and deleting your comments.

tg.ext.geo

TurboGears will join the ranks of geospatially-enabled Python frameworks with the addition of tg.ext.geo to tgtools. From Sanjiv Singh's Summer of Code status email:

4) TG2 Geo Extension with MapFish[6] The tg.ext.geo extension implements the server side component for vector query and editing. It is mainly based on MapFish server. However the templates are modified to suit the TG Object Distach BaseController. This may change in future and be fully based on MapFish server which uses a RESTFul controller. The extension makes use of existing PythonGIS tools like Shapely and GeoJSON. Thanks to Eric Lemonie, Sean Gillies, Matt Russell and the GISPython community for bringing the GIS tools to python developers. A demo application with openlayers based feature selection and a DojoGrid for displaying the attribute data can be seen at http://sanjiv.homelinux.net/. Thanks to Michele Bertoldi for helping me with his Dojo Grid.

I love seeing Shapely and Geojson put to use (MapFish, by the way, is a Shapely-using Pylons application). Sanjiv's application discovered a bug in Shapely and helped improve the software for everyone. I note that his mentor was Chris Perkins, a Python programmer and Plone developer at the National Renewable Energies Laboratory in Golden, who I would probably have met already if I'd been going to the Pythoneers meetings in Boulder. I need to get back to them soon.

Comments

Re: tg.ext.geo

Author: Chris Perkins

A co-worker showed me your blog entry, I added it to my reader. Thanks for blogging about Sanjiv's work. He has done a considerable amount of work in a short time to integrate/modularize a bunch of really cool technologies. For the record, I'm more of a TurboGears dev than a Plone dev... But I do appreciate the reference, perhaps we will meet up at the next pythoneers meeting. cheers. -chris

Re: tg.ext.geo

Author: Sean

Hi, Chris. I won't be making it tonight, but look forward to meeting this fall.

The distinction between disciplined and simple

If there's anything the GIS mainstream knows about REST, it's that REST is simpler and more lightweight than SOAP, "Web Services", or the OGC's service architecture. This notion is erroneous, and it's irresponsible to propagate it.

Bill de hÓra makes the distinction between disciplined and simple:

REST is not that simple; you can fit the basics into a few slides, but its purpose is to induce simplicity into the right places, not [to] be simple.

He's also compiled a great list of XMPP links.

Down to earth

Good writing, great analogies -- if anybody can rescue the concept of geospatial cloud computing from the pundits, Kirk Kuykendall can:

Look at what happened to engines. A hundred years ago they were the hot new technology - both internal combustion as well as electric. In those days you had to be intimately familiar with the physics of combustion to operate a motor vehicle. Now I rarely open the hood of my car. So in a sense engines have disappeared, but really they were subsumed by the automobile. What remains is a higher level object - the car - with only a few terms (like ignition) here and there hinting at what lay underneath.

From the post Kirk references:

GIS has been waiting for the cloud. GIS was born to exist in the cloud. It will reach its highest potential there. The Cloud is fertile ground for a GIS. A GIS is about much more than location alone. Its truest value and highest potential are exposed through the capability to perform spatial analysis, model and simulate. In a sense GIS is a 5-speed F1 racer that has been operating in second gear. The cloud has enormous potential to change that, shifting spatial gears and accelerating the wider use of GIS functionality. Buckle up - the ride is about to begin.

Shorter Jeff Thurston: I am as high as a kite.

Django on Jython

When I write about Python I'm almost always writing about "C Python", the Python interpreter and extension modules written in C and executed in the C runtime environment. The first alternative was "Java Python" or Jython, which is written in Java and executes in a JVM. It's author, Jim Hugunin, switched to working on IronPython (.NET), and it stalled for a while before reemerging last year under the sponsorship of Sun. The Jython team has been using Django, one of Python's highest profile applications, as a development target and have reached a major milestone.

I don't know enough about Java web app deployment to comment on the usefulness of this (Using Tomcat to run Django when you could just run it under mod_wsgi?) other than to get more direct access to Java libraries like Lucene, but it certainly inspires confidence in Jython. I could see Shapely or GeoDjango adapted to Jython to bring some geoprocessing power to the framework. Each are currently based on GEOS, which is acknowledged to suffer in translation from Java to C++. Jython versions based instead on JTS would have more features and better performance.

Via Sean McGrath.

Who is playing whom?

Sounds like FOSS4G 2008 is going to have an even stronger proprietary flavor than the 2007 edition. Says Gavin Fleming:

FOSS4G 2008 is not just about open source – the whole SA GIS community will be there, including all the normal 'proprietary' GIS community. Content, exhibitors, sponsors (including GIMS) are from the open source AND the proprietary communities, not that there is a clear distinction, with many being from both. If you attended AfricaGIS in '05, or any GISSA or local GIS conference for that matter, FOSS4G is for you and is going to be bigger and better. It is indeed also the ‘GISSA 2008’ conference. Learn about how proprietary and FOSS GIS can work together. Or, learn about how to make the transition from proprietary to FOSS.

I think this is not a positive trend.

Comments

Re: Who is playing whom?

Author: BenSlater

Don't be a hater! It sounds to me like the proprietary guys are wising up that they need to play nice with the open source crowd. And I think it's important for the open source crowd to stress that users don't necessarily need to give up their favorite propriety software to take advantage of the open source stuff. Everybody wins!

Re: Who is playing whom?

Author: Sean

Evidently you didn't enjoy the good old days as much as I did, Ben.

Re: Who is playing whom?

Author: Yves Moisan

"My current (2008) work interests are alternative local economic development strategies for mine-affected communities, spatial analysis and modelling to support sustainable development through mining and Sensor Web Enablement of mine environmental monitoring. I am passionate about Open Source GIS (at work and in education) and about bicycles as a means of alternative transport and economic empowerment!" Fleming's page If those are still his motivations I have to believe he thinks in terms of bridging the proprietary-FOSS gap in some sustainable way.

Re: Who is playing whom?

Author: BenSlater

Ha ha, the good old days involved a lot time sitting in front of a digitizing tablet for me. So I probably didn't enjoy them as much as you. :) But seriously - as a desktop GIS user, I was strictly a proprietary software user who infrequently dabbled with open source stuff. Now that everyone is doing Web GIS and the open source desktop applications have come so far, it would be silly not try out open source. And of course I'll want to know how to get the open source stuff to work with the already existing proprietary stuff I have. So far I'm really pleased. I'm curious about your reaction - do you see involvement from the proprietary players at these events as a threat to open source software?

Re: Who is playing whom?

Author: Sean

Ben: I was referring to the MapServer meetings that led up to what is now known as FOSS4G. I miss the open source enthusiasm. Did you attend them? Have you been attending FOSS4G since, or is this a purely hypothetical argument to you? Yves: the road to Hell is paved with good intentions. I had a good time last year, but found the pitching and endless stroking of the sponsors (proprietary software vendors) by speakers to be a soul-sucking experience. More of this simply dilutes the open source flavor.

Re: Who is playing whom?

Author: BenSlater

This is totally hypothetical for me. I can see your point about the overall atmosphere being less fun with the proprietary folks - they're there to make money as opposed to having fun or helping humanity. I was thinking more about the end product. I would expect the software to turn out just as well, and maybe sometimes even better with the proprietary involvement. Look on the bright side - you should be able to get some free drinks from all those vendors! :)

Re: Who is playing whom?

Author: Yves Moisan

I definitely share the concerns you have. I remember the days when I used to attend remote sensing conferences where one felt like a watcher of powerpoint slides and commercial booths. No code sprint there, nothing to go back home with and hack at. The spirit of FOSS4G meetings -- at least the ones I attended in Ottawa and Minneapolis -- definitely is more satisfying for me. I don't like "money bullying" in whatever form it takes. When FOSS4G becomes a suite of McActivities of sorts, I'll find myself missing substance. Luckily we can always flee to some pub ... We'll see what the atmosphere/environment is like this year. I hope it's no too different from the last FOSS4G I attended.

Re: Who is playing whom?

Author: Paul Ramsey

2008 has had to incorporate an existing regional GIS conference, and that means the amount of proprietary vendors and content is going to be somewhat higher than it might be ordinarily. Hopefully it will also mean that folks who would not ordinarily learn about FOSS will do so, and the world will be a brighter place. In general it seems like FOSS people know more about proprietary than vice versa, so this seems like a salutary opportunity, to me. We shall see in the final review just what people thought about it. I think the biggest difference between something like Ottawa 2004 (200 people) and Victoria 2007 (700 people) was one of scale rather than any "proprietary participation" thing. A bigger event is necessarily less cozy, and some "community" feel is lost.