[ckan-dev] Problems visualizing GEOJSON maps (FIXED)??

David davisoski at gmail.com
Fri Jul 8 16:03:31 UTC 2016


Hi.

Finally fixed.

In my geojson file wich works perfect in version 2.2 I have something 
like this at the beginning of each file:

{
     "type": "FeatureCollection",
     "crs": {
         "type": "name",
         "properties": {
             "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
         }
     },
     "features": [
         {

Eliminated:

   "crs": {
         "type": "name",
         "properties": {
             "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
         }

and works perfect.

I don't understand why this file works in demo.ckan.org,

Thanks




El 07/07/2016 a las 10:21, David escribió:
>
> Hi.
>
> Updated:
>
> Finally I have used
>
> *paster views create geojson_view*
>
>
> *First option:*
> (default)root:/usr/lib/ckan/default/src/ckan# /usr/lib/ckan/default/bin/paster --plugin=ckan views create*geojson_view*  -c /etc/ckan/default/production.ini
>
> *Result:*
>
> /usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/default_comparator.py:33: 
> SAWarning: The IN-predicate on "group.name" was invoked with an empty 
> sequence. This results in a contradiction, which nonetheless can be 
> expensive to evaluate.  Consider alternative strategies for improved 
> performance.
>   return o[0](self, self.expr, op, *(other + o[1:]), **kwargs)
>
> You are about to check 1 datasets for the following view plugins: 
> ['geojson_view']
>  Do you want to continue? [Y/n] y
> 2016-07-07 11:11:20,821 INFO  [ckan.lib.cli] Done
> (default)root:/usr/lib/ckan/default/src/ckan#
>
>
> *Second option:*
>
> (default)root:/usr/lib/ckan/default/src/ckan# 
> /usr/lib/ckan/default/bin/paster --plugin=ckan views create geo_view 
> -c /etc/ckan/default/production.ini
>
> *Result:*
>
> /usr/lib/ckan/default/local/lib/python2.7/site-packages/sqlalchemy/sql/default_comparator.py:33: 
> SAWarning: The IN-predicate on "group.name" was invoked with an empty 
> sequence. This results in a contradiction, which nonetheless can be 
> expensive to evaluate.  Consider alternative strategies for improved 
> performance.
>   return o[0](self, self.expr, op, *(other + o[1:]), **kwargs)
>
> You are about to check 1 datasets for the following view plugins: 
> ['geo_view']
>  Do you want to continue? [Y/n] y
> 2016-07-07 11:12:25,962 INFO  [ckan.lib.cli] Done
>
>
> Both plugins added in production.ini
>
>
> Any idea?
>
> Thanks
>
>
>
>
>
> ---------------------------------------------------------------------------
>
> Hola Adría.
>
> Unable to test:
>
> _/paster views create geojson_view/_
>
> This is the result:
> . /usr/lib/ckan/default/bin/activate
> cd /usr/lib/ckan/default/src/ckan
> *paster views create geojson_view*
>
> *RESULT:*
> Command 'views' not known (you may need to run setup.py egg_info)
> Known commands:
>    create       Create the file layout for a Python distribution
>    exe          Run #! executable files
>    help         Display help
>    make-config  Install a package and create a fresh config file/directory
>    points       Show information about entry points
>    post         Run a request for the described application
>    request      Run a request for the described application
>    serve        Serve the described application
>    setup-app    Setup an application, given a config file
>
> *I tried again:*
>
> I have installed ubuntu 12.04 from scratch.
> I have installed a  fresh version of CKAN 2.5
>
> I uploaded the same file tested in demo.ckan.org.
>
> Steps followed to install ONLY geoview in:
>
> https://github.com/ckan/ckanext-geoview
>
> . /usr/lib/ckan/default/bin/activate
> cd /usr/lib/ckan/default/src
> git clone https://github.com/ckan/ckanext-geoview.git
> cd ckanext-geoview
> python setup.py develop
>
>         RESULTS:
>             running develop
>             running egg_info
>             creating ckanext_geoview.egg-info
>             writing pbr to ckanext_geoview.egg-info/pbr.json
>             writing ckanext_geoview.egg-info/PKG-INFO
>             writing namespace_packages to 
> ckanext_geoview.egg-info/namespace_packages.txt
>             writing top-level names to 
> ckanext_geoview.egg-info/top_level.txt
>             writing dependency_links to 
> ckanext_geoview.egg-info/dependency_links.txt
>             writing entry points to 
> ckanext_geoview.egg-info/entry_points.txt
>             writing manifest file 'ckanext_geoview.egg-info/SOURCES.txt'
>             reading manifest file 'ckanext_geoview.egg-info/SOURCES.txt'
>             reading manifest template 'MANIFEST.in'
>             warning: no files found matching '*.less' under directory 
> 'ckanext/geoview'
>             warning: no files found matching '*.jpg' under directory 
> 'ckanext/geoview'
>             writing manifest file 'ckanext_geoview.egg-info/SOURCES.txt'
>             running build_ext
>             Creating 
> /usr/lib/ckan/default/lib/python2.7/site-packages/ckanext-geoview.egg-link 
> (link to .)
>             Adding ckanext-geoview 0.0.11 to easy-install.pth file
>
>             Installed /usr/lib/ckan/default/src/ckanext-geoview
>             Processing dependencies for ckanext-geoview==0.0.11
>             Finished processing dependencies for ckanext-geoview==0.0.11
>
> Later in production.ini:
>
> Copied the plugins
>         ## Plugins Settings
>
>         # Note: Add ``datastore`` to enable the CKAN DataStore
>         #       Add ``datapusher`` to enable DataPusher
>         #               Add ``resource_proxy`` to enable resorce 
> proxying and get aro$
>         #               same origin policy
>         ckan.plugins = stats text_view image_view recline_view 
> resource_proxy geo_view
>
>         # Define which views should be created by default
>         # (plugins must be loaded in ckan.plugins)
>         ckan.views.default_views = image_view text_view recline_view 
> geo_view
>
> Once I have updated the resource I get the view of the map, but the 
> map is not showed, just the mapa-mundi empty
>
> Thanks
>
>
>
> Hi David,
>
>
> On 30 June 2016 at 18:25, David<davisoski at gmail.com>  wrote:
>> Now I had installed a CKAN 2.5 and it seems geojson is part of another
>> extension; ckanext-geoview if CKAN >= 2.3
>> https://github.com/pduchesne/ckanext-geoview
> Please use this repo, as it is probably more up to date:
>
> https://github.com/ckan/ckanext-geoview
>
>
> Can you update your sources using this and see if the problem persists?
>
> Have you created the views with
>
> paster views create geojson_view
>
>
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe:https://lists.okfn.org/mailman/options/ckan-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160708/74036557/attachment-0003.html>


More information about the ckan-dev mailing list