[ckan-dev] Geojson - can't preview

Pedro Ferro pedro.ferro at gmail.com
Mon Nov 7 09:51:17 UTC 2016


Hi Sasha,

Thanks for you help.

I'm not an IT guy and  I didn't know how to manually change the projection
in the file, so exported the geojson file with GeoKettle and now it's
working.
I imagine that GeoKettle use the "correct" projection.


 proj4.defs("EPSG:26910", "+proj=utm +zone=10 +ellps=GRS80
+datum=NAD83+units=m +no_defs");

If I want to use our solution, where exactly should I add this line?


Thanks again,
Pedro





>
> Message: 1
> Date: Thu, 3 Nov 2016 10:36:55 -0400
> From: Sasha Cuerda <scuerda at ctdata.org>
> To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
> Subject: Re: [ckan-dev] Geojson - can't preview
> Message-ID:
>         <CAKj_OWxJ=0pip0yA5JQcuyOJKX9pz524no7djJZizfmba3XZGA at mail.
> gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Pedro,
>
> It looks like your Map Viewer is working but the Leaflet viewer is not. In
> the console I'm seeing a projection error stating "Uncaught No projection
> definition for code OGC:CRS84".
>
> Proj4Leaflet will either default to WGS84 if no CRS is present or will
> coerce the data to the correct projection if CRS is populated. Even though
> you are using what should be the default projection, Proj4Leaflet is still
> trying to lookup the correct projection information to complete the
> transformation.
>
> You can either remove the project string or add a proj4.defs string
> somewhere. I made a few modifications to ckanext-geoview and so I stuck a
> file with this info in my public/js folder which results in the file being
> bundle into geojson_preview.js, but you might be able to add it somewhere
> in your template AFTER geojson_preview.js is loaded.
>
> The line I added to deal with the projection I was working with was:
>
>  proj4.defs("EPSG:26910", "+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83
> +units=m +no_defs");
>
> Sasha
>
> On Mon, Oct 31, 2016 at 1:55 PM, Pedro Ferro <pedro.ferro at gmail.com>
> wrote:
>
> > Hi,
> >
> > I've install the plugin geoview with OpenLayers Viewer and Leaflet
> GeoJSON
> > Viewer.
> >
> > My development.ini is like that:
> > ckan.plugins = stats text_view image_view recline_view datastore
> > datapusher pdf_view spatial_metadata spatial_query resource_proxy
> geo_view
> > geojson_view
> > ckan.views.default_views = image_view text_view recline_view geo_view
> > geojson_view
> >
> >
> > But can't preview this files:
> > http://hermes.airc.pt:82/dataset/condeixa-nascimentos/
> > resource/beca530a-cfe1-4c05-9f58-1fc4371ad07e?view_id=
> > 2dbf4884-6810-4fc3-bcf7-02504b9361a5
> >
> > http://hermes.airc.pt:82/dataset/condeixa-populacao/
> > resource/5e81a856-5aa4-4dab-a1fc-0fa0ccd68656?view_id=
> > 1410cf15-f2e4-4b36-8f85-a6089a6273d5
> >
> > http://hermes.airc.pt:82/dataset/condeixa-edificios/
> > resource/3591e3c7-7f75-4905-94ef-0f2875039f28?view_id=
> > 00bcf4c9-054d-4f3d-b2f1-7c7dbe6f47a2
> >
> > http://hermes.airc.pt:82/dataset/condeixa-densidade-
> populacional/resource/
> > 69b62a9f-690f-4047-8db5-ffc3552d074f?view_id=d21b2738-
> > 02d2-4ffd-b647-bdfa65e5e8a7
> >
> >
> > Appreciate any help,
> >  Pedro
> >
> > _______________________________________________
> > 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
> >
> >
>
>
> --
> CT Data Collaborative, Director of Technology
> 805 Brook St Building 4
> Rocky Hill, CT 06067
> M: (860) 385-4860
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.okfn.org/pipermail/ckan-dev/
> attachments/20161103/d1a8d2cf/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 4 Nov 2016 08:50:17 +1100
> From: Steven De Costa <steven.decosta at linkdigital.com.au>
> To: ckan-global-user-group at googlegroups.com,
>         "ckan-dev at lists.okfn.org" <ckan-dev at lists.okfn.org>
> Subject: [ckan-dev] CKAN Association is now on YouTube
> Message-ID:
>         <CAMp=OsaojLOZQ5K7EsQ00t-kEdqQznBnScxSVR9_5+X4PntT0g@
> mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi everyone,
>
> I've created a YouTube channel for the CKAN Association and have started to
> collect clips into a variety of playlists. If you have a clip you'd like to
> suggest adding to the channel please let me know.
>
> We'll also upload clips from the Madrid CKANCon and the Canberra CKAN
> miniconf to that channel.
>
> Please subscribe to stay on top of updates. The channel is here:
> https://www.youtube.com/channel/UCVeS3fHRae7BzXVn8wMcQVw
>
> Cheers,
> Steven
>
> *STEVEN DE COSTA *|
> *EXECUTIVE DIRECTOR*www.linkdigital.com.au
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.okfn.org/pipermail/ckan-dev/
> attachments/20161104/1f62fb89/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 3 Nov 2016 19:10:26 -0400
> From: St?phane Lapointe <lapointes at ogsl.ca>
> To: ckan-dev at lists.okfn.org
> Subject: [ckan-dev] Solr/CKAN - Multi-valued theme - facet
> Message-ID: <add96dee-7c09-68d7-f891-d2df027d5d81 at ogsl.ca>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi,
>
> To translate our CKAN instance, we're using
> ckanext-scheming/ckanext-fluent plugins.
>
> We wanted to add a theming concept to our web site so we declared a
> dataset.json schema which contains
>
>          {
>            "field_name": "theme",
>            "preset": "multiple_checkbox",
>            "label": {
>              "fr": "Th?me",
>              "en": "Theme"
>            },
>            "choices": [
>              {
>                "value": "biodiversity",
>                "label": {
>                  "fr": "Biodiversit?",
>                  "en": "Biodiversity"
>                }
>              },
>              {
>                "value": "marine_conditions",
>                "label": {
>                  "fr": "Conditions maritimes",
>                  "en": "Marine conditions"
>                }
>              }
>            ]
>          },
>
> We can add and save dataset with multiple theme, so we're assuming this
> part is set correctly. But, we're having problem adding a facet theme.
>
>
> After some debugging, we've found that the Solr's response is quite
> strange. Here's what we've added in the Solr schema.xml:
>
>      <field name="theme" type="text" indexed="true" stored="true"
> multiValued="true"/>
>
>
> When we make a facet query to Solr, this is the response
>
> (...)
>
>      "extras_theme":"[\"*biodiversity*\", \"*marine_conditions*\"]",
>
> (we observe that this is not normal multiValued like we see with tags
> field. It probably should be: "biodiversity, marine_conditions"... We
> don't know if it's plugins' fault. Apparently, the side-effect is that
> something went wrong with parsing)
>
> (...)
>
>        "facet_counts":{
>          "facet_queries":{},
>          "facet_fields":{
>            "theme":*[**
> **            "biodivers",1,**
> **            "condit",1,**
> **            "marin",1,**
> **            "marinecondit",1]*},
>          "facet_ranges":{},
>          "facet_intervals":{},
>          "facet_heatmaps":{}}}
>
>
> Our question: How can we define a parser/analyzer to obtain a response
> like that:
>
>        "facet_counts":{
>          "facet_queries":{},
>          "facet_fields":{
>            "theme":*[**
> **            "biodiversity",1,**
> **            "marine_condition",1]*},
>          "facet_ranges":{},
>          "facet_intervals":{},
>          "facet_heatmaps":{}}}
>
>
> Thank you very much.
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.okfn.org/pipermail/ckan-dev/
> attachments/20161103/ad515afa/attachment-0001.html>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 3 Nov 2016 18:48:45 -0600
> From: Thomas Heetderks - MSU <thomas.heetderks at montana.edu>
> To: <ckan-dev at lists.okfn.org>
> Subject: Re: [ckan-dev] extension issues: ckanext-scheming
> Message-ID: <cc2f22ba-1d69-807b-243d-3676602d8283 at montana.edu>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Hi -
>
> So the problem was getting all the paths setup right in sys.path in the
> apache.wsgi file. The paths
> were OK to get the core of CKAN to work, but not extension/plugin
> locations. I also had to tweak
> some locations' owners
>
> I now have the extension functioning and am working on configuration...
> though I'm still not sure
> if this is the BEST way to extend the metadata schema...?
>
> Thanks for the replies.
> - Thomas Heetderks
>
>
> On 10/28/16 6:17 PM, Ian Ward wrote:
> > did you create a 'ckanext' package somewhere that wasn't declared as a
> > namespace package? If you run these in a python interpreter with your
> > virtualenv activated what do they print?
> >
> >>>> import ckanext; print ckanext
> >>>> from ckanext import scheming; print scheming
> > On Fri, Oct 28, 2016 at 7:58 PM, Thomas Heetderks - MSU
> > <thomas.heetderks at montana.edu>  wrote:
> >> Hi -
> >>
> >> We have CKAN 2.5.2 up and running on CentOS 6.8
> >>
> >> I have been trying to install ckanext-scheming
> >> The pip install actually went fine...
> >>
> >> But when I tried to add scheming_datasets to the ckan.plugins setting
> in the
> >> production.ini file-- I got this error:
> >>
> >> ImportError: No module named scheming.plugins
> >>
> >> The entire trace-back follows--
> >>
> >> Thanks in advance for any and all help!
> >>
> >> BTW: can anyone suggest the BEST way to extend the metadata schema?
> >> (I have found two so far, this extension and IDatasetForm, which I also
> had
> >> trouble with)
> >> ...I get the feeling I am somehow making this extension stuff harder
> than it
> >> should be :)
> >>
> >> - Thomas Heetderks
> >>
> >> ------------
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142] mod_wsgi
> >> (pid=12165): Target WSGI script '/etc/ckan/default/apache.wsgi' cannot
> be
> >> loaded as Python module.
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142] mod_wsgi
> >> (pid=12165): Exception occurred processing WSGI script
> >> '/etc/ckan/default/apache.wsgi'.
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142] Traceback
> (most
> >> recent call last):
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/etc/ckan/default/apache.wsgi", line 18, in <module>
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]
>  application =
> >> loadapp('config:%s' % config_filepath)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
> line 247,
> >> in loadapp
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     return
> >> loadobj(APP, uri, name=name, **kw)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
> line 272,
> >> in loadobj
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     return
> >> context.create()
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
> line 710,
> >> in create
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     return
> >> self.object_type.invoke(self)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py",
> line 146,
> >> in invoke
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     return
> >> fix_call(context.object, context.global_conf, **context.local_conf)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/local/lib/python2.7/site-packages/paste/deploy/util.py", line
> 55, in
> >> fix_call
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     val =
> >> callable(*args, **kw)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/src/ckan/ckan/config/middleware.py", line 58, in
> >> make_app
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]
> >> load_environment(conf, app_conf)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 232,
> in
> >> load_environment
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]
> >> p.load_all(config)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 134, in
> load_all
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]
>  load(*plugins)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 148, in
> load
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     service =
> >> _get_service(plugin)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 254, in
> >> _get_service
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     return
> >> plugin.load()(name=plugin_name)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_
> resources/__init__.py",
> >> line 2235, in load
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     return
> >> self.resolve()
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]   File
> >> "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_
> resources/__init__.py",
> >> line 2241, in resolve
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142]     module =
> >> __import__(self.module_name, fromlist=['__name__'], level=0)
> >> [Fri Oct 28 13:00:38 2016] [error] [client 52.57.242.142] ImportError:
> No
> >> module named scheming.plugins
> >>
> >> _______________________________________________
> >> 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
> >>
> > _______________________________________________
> > 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/20161103/33d70e40/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> 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
>
>
> ------------------------------
>
> End of ckan-dev Digest, Vol 73, Issue 4
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161107/852b84f0/attachment-0003.html>


More information about the ckan-dev mailing list