[ckan-dev] "Geo"-Datastore?
Dominik Moritz
dominik.moritz at okfn.org
Wed Jan 9 16:51:18 UTC 2013
Hello,
I've sent you an email off the list.
Best wishes,
Dominik
On 9 Jan 2013, at 01:24, Ryan Clark <ryan.clark at azgs.az.gov> wrote:
> Thanks Dominik -
>
> Just to be clear, would you imagine that we would:
> 1) modify the DataStore extension to include some appropriate plugin hooks, then
> 2) build a custom extension that would utilize those hooks in order to implement the geo-datastore concept?
>
> That seems to me to make the most sense, since we'd love to see the hooks make their way into OKFN's CKAN repository, but I would assume that the geospatial functionality itself might best live in an extension somewhere. I was envisioning a "ckanext-geoserver" extension that would allow users to set configuration options about connecting to a running Geoserver instance, and allow them to specify that a .csv file they're about to upload is a target for deployment via Geoserver. At that point you'd trigger the functionality to create a PostGIS-enabled table and plug in the appropriate content.
>
> It turns out that going from CSV to PostGIS is remarkably simple using the OGR python bindings. Here are the basics: https://gist.github.com/bd08f0e7476ab6939bab
>
> Feel free to send me and Christoph an email directly if you think this discussion should be moved off the development list.
>
> Thanks!
> ____________________
>
> Ryan Clark
> ryan.clark at azgs.az.gov
> (520) 302-4871
>
>
>
>
>
>
> On Jan 8, 2013, at 2:41 PM, Dominik Moritz <dominik.moritz at okfn.org> wrote:
>
>> Hi Christoph,
>>
>> At the moment, the DataStore does not support PostGIS and there are no plugin hooks into the DataStore. We have actually had a discussion about this matter some time ago but there were not enough requests for this feature. However, if you plan to add this functionality to the datastore, I'd be very happy to help you find your way around in the code.
>> The last option (modifying the datastore extension) is certainly the best option and it shouldn't be too difficult to add the missing column types and the code to add the columns.
>>
>> Best wishes,
>> Dominik
>>
>> On 8 Jan 2013, at 20:11, Ryan Clark <ryan.clark at azgs.az.gov> wrote:
>>
>>> I'm working on a project that will involve users uploading .csv files containing lat/lng columns. The goal is to accept these uploads and put the data into PostGIS tables which will be exposed through Geoserver as WMS/WFS layers.
>>>
>>> The way I see it, the Datastorer -> Datastore chain already takes care of most of what needs to be done, minus two important aspects:
>>> Need to create a PostGIS geometry column in the PostgreSQL table currently built by the Datastore extension
>>> Need to convert lat/lng columns into WKT or WKB formats to be loaded into the PostGIS geometry column
>>> Configure Geoserver to look at that table (but I'm not worried about this just yet)
>>>
>>> What I'm struggling with is trying to find the right way to bundle this functionality as an extension. I tried to follow the Datastore function chain through, from the JSON POSTed to .../dataset_create until the data is loaded into a PostgreSQL table. It didn't appear that there were any plugin hooks in the chain that could be used to accomplish these two extra tasks.
>>>
>>> Does anyone have any good ideas where I might be able to hook in? Its very possible I missed something, or perhaps there is some other plugin interface that I should consider?
>>>
>>> My last ditch effort would involve modifying the Datastorer extension to POST to my own URL, and mimic Datastore functionality there, plus my geo-extras. Another option could be to modify the Datastore extension and plant my own plugin hooks.
>>>
>>> Thanks!
>>> ____________________
>>>
>>> Ryan Clark
>>> ryan.clark at azgs.az.gov
>>> (520) 302-4871
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ckan-dev mailing list
>>> ckan-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
More information about the ckan-dev
mailing list