[ckan-discuss] problem implimenting WMS preview

Adrià Mercader adria.mercader at okfn.org
Wed Oct 30 10:43:35 GMT 2013


Hi Andrew,

Both files "work" on the demo site (they don't actually display the
resources but those are separate issues), so I suspect something in
your setup is causing the errors.

http://demo.ckan.org/dataset/test-minnesota

The resource_proxy urls are meant to be used internally by the
previews, and the ones that you pasted are correct, they are the ones
that load the preview frontend. The proxy seems to be working fine so
I don't think the problem lies there.

Is the source code of your geodatamn extension available somewhere so
we can have a quick look? Are you using custom templates for the
resource page?
What version of CKAN / ckanext-spatial are you using?

Adrià

On 29 October 2013 21:04, Koebrick, Andrew (MNIT)
<andrew.koebrick at state.mn.us> wrote:
> I understand that the WMS viewer that ships is intended for production use.  But I would like to get it going to ensure that our install is working properly; then I could go on to try implementing a more robust solution.
>
> After much floundering, I am starting to think that my problem is not with the WMS preview plugin, but rather in the resourceproxy plugin.  I am looking there for the problem since my attempt to implement the geojson preview is also failing, with the same error.  My test is here:
> http://devel.gisdata.mn.gov/dataset/minnesota-school-district-boundaries-2012-2013
> It also fails with the error "Error - <type 'exceptions.TypeError'>: string indices must be integers" written to the log.
>
> While trying to debug, I found what may be a small clue:
>
> I see that the before_map function in class ResourceProxy is supposed to return a connection to "/dataset/{id}/resource/{resource_id}/proxy"  This however does not seem to be the URL which is accessed when the preview option is selected from the webpage.  I get:
> http://devel.gisdata.mn.gov/dataset/minnesota-school-district-boundaries-2012-2013/resource/221f14d9-1bbd-49d8-af49-2c75911b297c  (geojson sample)
> and
> http://devel.gisdata.mn.gov/dataset/base-2008-naip-airphotos-cir-wms/resource/8d8cb077-77c1-439b-b208-c9f6c63392e2 (wms sample)
> Both of which fail and write the cryptic error to my logs.  And when I look at the logs on the server hosting the WMS, there are no hits from our CKAN box, or the desktop client.  So
>
> But if I manually add the "/proxy" to the end of the URL, I get better results.  In the case of the wms, I get the actual getCapabilities documents:
> http://devel.gisdata.mn.gov/dataset/base-2008-naip-airphotos-cir-wms/resource/8d8cb077-77c1-439b-b208-c9f6c63392e2/proxy
>
> Could there be something wrong with my Routes?  Any other ideas base on this additional info?  At this point I am going through the various plugins and adding lines to write debug statements to the errorlog, to try to figure out the state of the system and values of variables when the proxy fails.  If there is a better way to debug I would love to learn it.
>
> Thanks,
>
> Andrew
>
>
>
> -----Original Message-----
> From: Adrià Mercader [mailto:adria.mercader at okfn.org]
> Sent: Friday, October 25, 2013 4:29 AM
> To: Koebrick, Andrew (MNIT)
> Cc: ckan-discuss at lists.okfn.org
> Subject: Re: [ckan-discuss] problem implimenting WMS preview
>
> Hi Andrew,
>
> Sorry, I could not reproduce the error. The widget loads for me with this WMS service, but the actual service can not be previewed because of limitations on the viewer.
>
> As stated in the docs, the WMS viewer shipped with ckanext-spatial is just a proof of concept [1]. There are some examples in the docs of projects which have integrated better viewers.
> BTW, if you think it will be a good a addition to have, you can vote for it on the roadmap card [2]
>
> Adrià
>
> [1] http://docs.ckan.org/projects/ckanext-spatial/en/latest/previews.html#wms-preview
> [2] https://trello.com/c/mLba4ufr/21-wms-preview-work-integration
>
> On 24 October 2013 18:38, Koebrick, Andrew (MNIT) <andrew.koebrick at state.mn.us> wrote:
>> Unfortunately there is no additional backtrace info.  Here is another
>> link that may work:
>>
>> http://devel.gisdata.mn.gov/dataset/base-2008-naip-airphotos-cir-wms
>>
>> It is never clear to me what our DNS folks have make public vs. internal.
>>
>>
>>
>> Here is the GetCapabilities document that is being linked to:
>>
>> http://geoint.lmic.state.mn.us/cgi-bin/wms?VERSION=1.3.0&SERVICE=WMS&R
>> EQUEST=GetCapabilities
>>
>>
>>
>> Thanks for any assistance you can provlde.
>>
>>
>> Andrew
>>
>>
>>
>> p.s. I sent a prior email directly to Adrià but neglected to also send
>> back to the list; this is a copy of my earlier email.
>>
>>
>> _______________________________________________
>> ckan-discuss mailing list
>> ckan-discuss at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-discuss
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss
>>
>
>



More information about the ckan-discuss mailing list