[ckan-dev] ckan-spatial, WMS Viewer

Adrià Mercader adria.mercader at okfn.org
Mon May 13 18:10:49 UTC 2013


Hi,

Sorry about the delay in answering and the confusion around the
different map widgets. Both map widgets (the spatial filter and the
dataset extent map) have been now ported to CKAN 2.0 in
ckanext-spatial:

* Spatial filter:
See it in action: http://demo.ckan.org/dataset
Docs: https://github.com/okfn/ckanext-spatial/tree/release-v2.0#spatial-search-widget

* Dataset Map:
See it in action:http://demo.ckan.org/dataset/adur_district_spending
Docs: https://github.com/okfn/ckanext-spatial/tree/release-v2.0#dataset-extent-map

Hope this helps,

Adrià


On 13 May 2013 15:44, Mark Wainwright <mark.wainwright at okfn.org> wrote:
> Hi Heinrich,
>
> I'm not sure of the details, but as I understand the search facilities
> of ckanext-spatial weren't fully finished, e.g. there was no map-based
> search, which there will be when ckanext-spatial is upgraded soon.
>
> However it's unlikely to be finished next week. If you really need the
> existing spatial search facilities by then, you had better go with
> 1.8, but if you can wait a little longer for better ones, use 2.0. Of
> course, this will also save you problems upgrading later.
>
> Mark
>
>
> On 13/05/2013, Heinrich Widmann <widmann at dkrz.de> wrote:
>> Hello Dominik,
>> thank you for this information.
>>
>> Actually we are forced to get ckanext-spatial working til the end of
>> next week.
>> So I wonder what means "quite soon" and whether we should better adhere
>> to 1.8 to have a working "spatial search".
>>
>> Furthermore we plan to add "faceted search" for a few other keys
>> ("Author", "Origin", ...) and add corresponding search buttons and/or
>> widgets.
>> I guess the most appropriate way to implement this is to write an
>> extension based on CKAN2.0 and add beside the facets "Organizations",
>> "Groups" etc. in
>> the navigation bar of the CKAN GUI  some further facets "Author",
>> "Origin" etc. ...
>> But maybe - for a quick solution - it's better to get sticked with
>> CKAN1.8 and implement (analog to ">> Filter by location") some
>> additioanl widgets ">> Filter by Author" etc. ....
>>
>> What would you recommend ?
>> Thanks,
>> Heinrich
>>
>>
>> Am 09.05.2013 11:54, schrieb Dominik Moritz:
>>> Hello Heinrich,
>>>
>>> Sorry for the confusion but the search widget of ckanext-spatial is not
>>> yet ready. It will be quite soon, though.
>>>
>>> Best wishes,
>>> Dominik
>>>
>>> On 8 May 2013, at 20:36, Dominik Moritz <dominik.moritz at okfn.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> I meant the release 2.0 branch for ckanext-spatial (see
>>>> https://github.com/okfn/ckanext-spatial/tree/release-v2.0), not CKAN
>>>> itself. However, it's good that you use ckan from the release branch
>>>> because this will become the stable version 2.0 and not master (which
>>>> will become CKAN 2.1) ;-)
>>>>
>>>> Okay, the `PluginNotFoundException` is raised because the extension is
>>>> not properly installed. Have you called `python setup.py install` if you
>>>> cloned the repo or reinstalled the extension with `pip install
>>>> https://github.com/okfn/ckanext-spatial/archive/release-v2.0.zip`? When
>>>> reinstalling CKAN, you probably used a different virtual env which did
>>>> not have ckanext-spatial installed. You can always confirm that a package
>>>> is installed by looking what `pip freeze` tells you when you are in the
>>>> CKAN virtual env.
>>>>
>>>> Best wishes,
>>>> Dominik
>>>>
>>>> On 8 May 2013, at 18:35, Heinrich Widmann <widmann at dkrz.de> wrote:
>>>>
>>>>> Hi Dominik,
>>>>> thank you for your response.
>>>>>
>>>>> Am 08.05.2013 14:43, schrieb Dominik Moritz:
>>>>>> Hi,
>>>>>>
>>>>>> On 8 May 2013 14:14, Heinrich Widmann <widmann at dkrz.de
>>>>>> <mailto:widmann at dkrz.de>> wrote:
>>>>>>
>>>>>>    Hi,
>>>>>>    we have the same problem here :
>>>>>>    We upgraded CKAN 1.8  - with extension ckanext-spatial working -
>>>>>>    to 2.0,
>>>>>>    but know no button ">> filter by location" and no view of a map
>>>>>>    (as well for datasets with spatial key) occur.
>>>>>>
>>>>>>
>>>>>> I think we are talking about different issues. The resource_proxy is
>>>>>> only for previews.
>>>>>>
>>>>>> Concerning your issue. Are you on the release 2.0 branch
>>>>>> (https://github.com/okfn/ckanext-spatial/tree/release-v2.0)? It looks
>>>>>> like the widget was added in
>>>>>> https://github.com/okfn/ckanext-spatial/issues/6.
>>>>> Ok, we reinstalled ckan with the mentioned branch. But get the following
>>>>> error if we add the needed plugin dataset_extend_map
>>>>> (w/o this paster starts CKAN - but of course w/o spatial search) :
>>>>>
>>>>> (pyenv)bash-3.2$ paster serve development.ini
>>>>> Traceback (most recent call last):
>>>>> File "/opt/ckan2/pyenv/bin/paster", line 8, in <module>
>>>>>    load_entry_point('PasteScript==1.7.5', 'console_scripts',
>>>>> 'paster')()
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/script/command.py",
>>>>> line 104, in run
>>>>>    invoke(command, command_name, options, args[1:])
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/script/command.py",
>>>>> line 143, in invoke
>>>>>    exit_code = runner.run(args)
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/script/command.py",
>>>>> line 238, in run
>>>>>    result = self.command()
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/script/serve.py",
>>>>> line 284, in command
>>>>>    relative_to=base, global_conf=vars)
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/script/serve.py",
>>>>> line 321, in loadapp
>>>>>    **kw)
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
>>>>> line 247, in loadapp
>>>>>    return loadobj(APP, uri, name=name, **kw)
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
>>>>> line 272, in loadobj
>>>>>    return context.create()
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
>>>>> line 710, in create
>>>>>    return self.object_type.invoke(self)
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/deploy/loadwsgi.py",
>>>>> line 146, in invoke
>>>>>    return fix_call(context.object, context.global_conf,
>>>>> **context.local_conf)
>>>>> File
>>>>> "/opt/ckan2/pyenv/lib/python2.6/site-packages/paste/deploy/util.py",
>>>>> line 56, in fix_call
>>>>>    val = callable(*args, **kw)
>>>>> File "/opt/ckan2/pyenv/src/ckan/ckan/config/middleware.py", line 54, in
>>>>> make_app
>>>>>    load_environment(conf, app_conf)
>>>>> File "/opt/ckan2/pyenv/src/ckan/ckan/config/environment.py", line 133,
>>>>> in load_environment
>>>>>    p.load_all(config)
>>>>> File "/opt/ckan2/pyenv/src/ckan/ckan/plugins/core.py", line 95, in
>>>>> load_all
>>>>>    find_user_plugins(config)
>>>>> File "/opt/ckan2/pyenv/src/ckan/ckan/plugins/core.py", line 177, in
>>>>> find_user_plugins
>>>>>    raise PluginNotFoundException(name)
>>>>> ckan.plugins.core.PluginNotFoundException: dataset_extent_map
>>>>>
>>>>> Any clue what's going wrong ?
>>>>> Heinrich
>>>>>
>>>>>>    However the spatial extension seems to be active during upload of
>>>>>>    data :
>>>>>>
>>>>>>    2013-05-08 12:33:20,200 DEBUG [ckanext.spatial.plugin] Received:
>>>>>>    u'{"type":"Polygon","coordinates":[[[-88.542,0],[-88.542,358.125],
>>>>>>    [88.542, 0], [-88.542, 0]]]}'
>>>>>>
>>>>>>    2013-05-08 12:33:20,204 DEBUG [ckanext.spatial.lib] Created new
>>>>>>    extent for package 5c347a7c-f76c-4e80-9a84-deab52805a5b
>>>>>>
>>>>>>    To add resource_proxy to the plugins changed nothing.
>>>>>>
>>>>>>
>>>>>>    Am 19.04.2013 17:24, schrieb Guillaume Sueur:
>>>>>>
>>>>>>        Hi again Adria,
>>>>>>
>>>>>>        I've managed to make it work, but only using a custom proxy
>>>>>>        based in cgi-bin.
>>>>>>
>>>>>>    What exactly we have to do here ?
>>>>>>    However we would prefer not to be forced to use a "custom proxy"
>>>>>> here.
>>>>>>
>>>>>>    Best regards,
>>>>>>    Heinrich
>>>>>>
>>>>>>        Don't understand how CKAN proxyfying stuff is working.
>>>>>>
>>>>>>        Best regards,
>>>>>>
>>>>>>        Guillaume
>>>>>>
>>>>>>        Le 19/04/13 16:21, Guillaume Sueur a écrit :
>>>>>>
>>>>>>            Hi Adria,
>>>>>>
>>>>>>            That sounds like a very good idea indeed. I've activated
>>>>>>            the plugin, but
>>>>>>            I still have the same error.
>>>>>>            Do I have to tune the wms_preview.js ? There is a
>>>>>>            var proxy = false
>>>>>>            at the beginning. Does it have to point to the actuel
>>>>>>            proxy URL ?
>>>>>>
>>>>>>            Thanks
>>>>>>
>>>>>>            Guillaule
>>>>>>
>>>>>>            Le 19/04/13 12:21, Adrià Mercader a écrit :
>>>>>>
>>>>>>                Hi,
>>>>>>
>>>>>>                    2013/4/17 Guillaume Sueur
>>>>>>                    <no-reply at neogeo-online.net
>>>>>>                    <mailto:no-reply at neogeo-online.net>>
>>>>>>
>>>>>>                        I've been looking for why the WMS preview
>>>>>>                        doesn't work on my fresh CKAN
>>>>>>                        2.0 installation. I've found out (in
>>>>>>                        wms_preview.js) that the
>>>>>>                        getCapabities
>>>>>>                        URL seems wrong when it gives :
>>>>>>
>>>>>>
>>>>>> /packages?id=wms-geologie-brgm&resource_id=4a198fbc-0589-4a24-977b-bb037650c229&SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1
>>>>>>
>>>>>>
>>>>>>                The most likely issue is that you have not added the
>>>>>>                "resource_proxy"
>>>>>>                plugin to your ini file, eg
>>>>>>
>>>>>>                ckan.plugins = resource_proxy ...
>>>>>>
>>>>>>                I will update the docs to make this clearer
>>>>>>
>>>>>>                This allows the js to do a remote request to a
>>>>>>                different server, and
>>>>>>                if the plugin is not enabled, the routes module will
>>>>>>                generate a
>>>>>>                default url (/packages)
>>>>>>
>>>>>>
>>>>>>
>>>>>>                On 17 April 2013 12:55, Armin Retterath
>>>>>>                <armin.retterath at gmail.com
>>>>>>                <mailto:armin.retterath at gmail.com>>
>>>>>>                wrote:
>>>>>>
>>>>>>                    hi guillaume,
>>>>>>
>>>>>>                    maybe this files help you ;-)
>>>>>>
>>>>>>                    i made them for 1.8.1b but maybe they are the same
>>>>>>                    as for 2.0.
>>>>>>
>>>>>>                    the parsing of the capabilities was a little bit
>>>>>>                    ugly before ;-)
>>>>>>
>>>>>>                Thanks for this Armin, if you do a pull request we'll
>>>>>>                be happy to
>>>>>>                review and merge the changes.
>>>>>>
>>>>>>                As I said, the WMS previewer was very quick and dirty,
>>>>>>                made only as an
>>>>>>                example.
>>>>>>
>>>>>>
>>>>>>                Thanks,
>>>>>>
>>>>>>                Adrià
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>                        Thanks
>>>>>>
>>>>>>                        Guillaume
>>>>>>
>>>>>>
>>>>>>
>>>>>>                        _______________________________________________
>>>>>>                        ckan-dev mailing list
>>>>>>                        ckan-dev at lists.okfn.org
>>>>>>                        <mailto: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
>>>>>>                    <mailto: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
>>>>>> <mailto: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 <mailto: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 <mailto:ckan-dev at lists.okfn.org>
>>>>>>        http://lists.okfn.org/mailman/listinfo/ckan-dev
>>>>>>        Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>>>>>
>>>>>>
>>>>>>    --
>>>>>> -----------------------------\\---------------------------------------
>>>>>>    Heinrich Widmann              \\ Deutsches Klimarechenzentrum GmbH
>>>>>>    Phone: +49 40 460094 282 <tel:%2B49%2040%20460094%20282>       \\
>>>>>>      Abteilung Datenmanagement
>>>>>>    FAX: +49 40 460094 270 <tel:%2B49%2040%20460094%20270>        \\
>>>>>>   Bundesstr. 45a
>>>>>>    Email: widmann at dkrz.de <mailto:widmann at dkrz.de>           \\
>>>>>> D-20146 Hamburg
>>>>>>    http://www.dkrz.de  \\  Germany
>>>>>>
>>>>>> -----------------------------------\\---------------------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>    _______________________________________________
>>>>>>    ckan-dev mailing list
>>>>>>    ckan-dev at lists.okfn.org <mailto: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
>>>>> --
>>>>> -----------------------------\\---------------------------------------
>>>>> Heinrich Widmann              \\ Deutsches Klimarechenzentrum GmbH
>>>>> Phone: +49 40 460094 282       \\   Abteilung Datenmanagement
>>>>> FAX:   +49 40 460094 270        \\    Bundesstr. 45a
>>>>> Email: widmann at dkrz.de           \\   D-20146 Hamburg
>>>>> http://www.dkrz.de                \\  Germany
>>>>> -----------------------------------\\---------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>
>>
>> --
>> -----------------------------\\---------------------------------------
>> Heinrich Widmann              \\ Deutsches Klimarechenzentrum GmbH
>> Phone: +49 40 460094 282       \\   Abteilung Datenmanagement
>> FAX:   +49 40 460094 270        \\    Bundesstr. 45a
>> Email: widmann at dkrz.de           \\   D-20146 Hamburg
>> http://www.dkrz.de                \\  Germany
>> -----------------------------------\\---------------------------------
>>
>>
>> _______________________________________________
>> 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
>>
>
>
> --
> Business development and user engagement manager
> The Open Knowledge Foundation
> Empowering through Open Knowledge
> http://okfn.org/  |  @okfn  |  http://ckan.org  |  @CKANproject
>
> _______________________________________________
> 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