Hello all
Had anyone ever tried this? Making assets spatial could be an amazing enhancement, and would open up all sorts of possibilities.
Thanks
Tom
Spatializing Matrix with PostGIS
Not really, although we have implemented geo spatial search using Funnelback on various sites. I believe the new sa.gov.au site using spatial searching: http://www.sa.gov.au/directories/state-schools-and-services
PostGIS supplies a superset to the regular Postgres installation, so theoretically you could get Matrix running under as PostGIS DB without issue.
That said, having GIS enabled assets would require a lot of thought so I suspect it's the sort of thing that would only work its way in if there's already a functional example in the community or someone willing to fund Squiz Labs developing it.
It might also be a support issue as most Sys Admins don't have anything to do with GIS and it does require a little extra knowledge.
I thought there was no reason why it wouldn’t work. Your point about lack of GIS knowledge in a web company is a fair one. My main issues, if it works fundamentally, would be subsequent Matrix upgrades, and the interface work required to expose the spatial fields. I guess the former might at worst require reinstallation of PostGIS after a Matrix upgrade. Add a proof of concept, one could do without the latter, and just use a GIS client to update records with the spatial data.
In fact, adding spatial interface fields would only work for point features. Lines or polygons would be way more work. An external client would probably be the best way to go. It could be integrated - have a link in the Matrix interface to launch a desktop GIS client, editing the asset record in the dB.
I am sorely tempted by this. Our websites deal with extremely spatial data, and building on what I see as Matrix’s main strength - handling heterogeneous data and displaying it coherently - a spatial dimension makes a lot of sense.
I suspect "the right way" to do what you're describing (i.e keeping the editing of the GIS data in a dedicated client, but pushing the presentation layer out to Matrix) can already be done without new code (note: I'm not saying it's pretty).
I don't think you'd have to change anything to use the DB Data Source assets with a PostGIS DB (i.e PostGIS mainly adds types that the server can index better, I don't think it affects the binary psql protocol at all) - so you should be able to set up a PostGIS DB with your data set (preferably on a separate host, so that you have separated concerns) and then point the DB Data Source assets at that.
Obviously this gets a bit cumbersome if you're doing lots of really similar queries / rendering problems - but I think the way to PoC this would be to start with the DB assets and then move on to feature requests (or try your hand at building custom assets) for any common query / rendering problems (as it'd be really hard to identify where you need to start before hand).
- just my 2c.
Thanks, David. Obviously, I know I can pull in external PostGIS data. I'm talking about core Matrix assets being spatial: calendar events, news stories, images, and so on. So, I guess we are talking about three different things:
- data - can Matrix PostgreSQL by PostGISsed in a resilient way, to enable the spatializing of core Matrix assets?
- back-end presentation - how can _admin (in the first instance) expose such spatial data?
- front-end presentation - probably not so doable at the mo, as some kind of mapping engine would be required, which is not worth considering, but rather using an external facility a la GeoServer/TileMill/whatever
I'll see if I can free up some time to look into this, and report back. Any other thoughts very much appreciated. I've never tried to extend Matrix, so I'll see if the manuals have any documentation on how best to approach this.
Thanks
Tom
I'm getting going on this, and will probably need to ask one or two beginner questions. Here's the first: using the current VM download, what account should I use to log into PostGreSQL to install the PostGIS extensions?
Unfortunately I'm only familiar with PostGIS on Debian and Matrix on Enterprise Linux - so I'm not really sure how / if you can get PostGIS running directly under the standard SL6 VM.
That said, either "psql -U postgres" or "sudo -u postgres psql" should get you on to postgres.
Ah, great - that's got me to the PGSQL shell - just what I needed. No doubt I'll have other problems, but I'll shift this over to the dev thread if I do.
Thanks for all the help
Tom