[GeoNode-users] Error 405 not permitted

Simone Dalmasso simone.dalmasso at gmail.com
Thu Feb 18 01:10:48 PST 2016


Thanks David,

if it could be of interest, here is the PR that added the 4326 support
https://github.com/GeoNode/geonode/pull/2292

Ciao

2016-02-18 10:07 GMT+01:00 Alessio Fabiani <alessio.fabiani at geo-solutions.it
>:

> Nice,
> good to know that you debugged the issue, and thanks for your analysis and
> feedbacks.
>
> It would be nice if you could open an issue on GitHub about this problem
> and if you like propose the patch to fix it.
>
> Eventually I'll try to find some time in the next days to refine the patch
> and envisage a test case to attach to the PR.
>
>
> Best Regards,
> Alessio Fabiani.
>
> ==
> GeoServer Professional Services from the experts!
> Visit http://goo.gl/it488V for more information.
> ==
>
> Ing. Alessio Fabiani
> @alfa7691
> Founder/Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax:     +39 0584 1660272
> mob:   +39 333 8128928
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
>
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility  for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
> ---------------------------------------------------------------------
>
> On Thu, Feb 18, 2016 at 10:01 AM, David Alda Fernandez de Lezea <
> dalda at hazi.eus> wrote:
>
>> Hi,
>>
>> > GeoNode supports any SRS because geoserver does. The 900913 and 4326
>> are the two supported by the mapping client for visualisation purpose.
>> Originally was supported only the 900913 and recently > the 4326 has been
>> added, but this doesn't impact the way the data are stored but only how
>> they are requested to geoserver.
>>
>> I know, I know, but what I meant is that in
>> http://192.168.1.190/admin/layers/layer/568/  (DJANGO admin page -->
>> Layers) in some way some information about the SRS's is stored (900913 and
>> 4326) See the image attached. No problem with that. My tests confirmed that
>> even though my global SRS was in EPSG:3857, in the geoexplorer view
>> (layer_geoext_map.html) I was getting the information about the extent of
>> the layer in EPSG:4326 so I started to change things in this file. But it
>> wasn't the right place.
>>
>> In the end I came to realize that the file to edit was
>> geonode/layers/views.py in which information about the layers is retrieved
>> to build the "layer_detail.html" web page. So inside the function
>>
>>         def layer_detail(request, layername,
>> template='layers/layer_detail.html'):
>>
>>         in Line 227 I added
>>
>>             config["srs"] = 'EPSG:900913'
>>             config["bbox"] = llbbox_to_mercator([float(coord) for coord
>> in bbox])
>>
>> My reasoning was that as during the configuration of the GXPMAP object
>> the SRS was the 'DEFAULT_MAP_CRS', which I set to 3857, but the bbox of the
>> layer was in Geographic coordinates so there was a coordinate difference
>> that caused that the layer was positioned far away from where it was
>> supposed to be, so I forced the SRS (although it is not stored like that)
>> to be 900913.
>>
>>         config["srs"] = getattr(settings, 'DEFAULT_MAP_CRS',
>> 'EPSG:900913')
>>         config["bbox"] = bbox if config["srs"] != 'EPSG:900913' \
>>                 else llbbox_to_mercator([float(coord) for coord in bbox])
>>
>> It's a bit messy but I've finally made it work (for the moment). :-D
>>
>> Alessio, I'll take a note about the advancing logging you proposed for
>> future problems.
>>
>> Maybe this could help to someone else.
>>
>> Thanks both of you.
>>
>> Regards,
>>
>>
>> Agur bero bat,
>>
>>
>>
>> David Alda Fernández de Lezea
>> Área de Sistemas de Información Geográfica, Planificación Territorial y
>> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
>> Arloa.
>> dalda at hazi.eus | www.hazi.eus
>> T 945 003 240 – M 627 923 170 – F 945 003 290
>> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>>
>> *********************  LEGE OHARRA   *******************   AVISOLEGAL
>> *******************   DISCLAIMER   *****************************
>> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
>> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
>> kontserbatu gabe.
>> Este mensaje es personal y confidencial y su uso no autorizado está
>> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
>> sin reenviarlo ni conservarlo.
>> This message is personal and confidential, unauthorised use is legally
>> prohibited. If you are not the intended recipient, delete it without
>> resending or backing it.
>>
>> De: Simone Dalmasso [mailto:simone.dalmasso at gmail.com]
>> Enviado el: miércoles, 17 de febrero de 2016 16:23
>> Para: David Alda Fernandez de Lezea
>> CC: Alessio Fabiani; geonode-users at lists.osgeo.org
>> Asunto: Re: [GeoNode-users] Error 405 not permitted
>>
>> Hi David,
>> just a clarification on the supported SRS. GeoNode supports any SRS
>> because geoserver does. The 900913 and 4326 are the two supported by the
>> mapping client for visualisation purpose. Originally was supported only the
>> 900913 and recently the 4326 has been added, but this doesn't impact the
>> way the data are stored but only how they are requested to geoserver.
>>
>> 2016-02-17 12:12 GMT+01:00 David Alda Fernandez de Lezea <dalda at hazi.eus
>> >:
>> Hi,
>>
>> Thanks for your response Alessio.
>>
>> I think it has nothing to do with what I mentioned previously. I’ve
>> checked the contents of each tile of the preview image and I’m getting some
>> coords really away from our extent although the SRS is OK. My mistake.
>>
>> -76.43702827394,0,0,76.43702827394
>>
>> I've added to the javascript code a coordinate transformation. Now it
>> zooms to where it should, but it doesn't load the layer.
>>
>> Would this probably be related to the fact that GeoNode supposes that
>> everything that comes with an SRS different from EPSG:900913 it turns to
>> EPSG:4326?
>>
>> Because in the Django admin web, I've seen in the layers properties that
>> there's a field SRS (filled with ESG:4326) and other fields with the
>> corresponding bbox.
>>
>> Is there a way to change this programatically?
>>
>> In which python is this set?
>>
>> Thanks and sorry for the mistake.
>>
>> Regards,
>>
>> Agur bero bat,
>>
>>
>>
>> David Alda Fernández de Lezea
>> Área de Sistemas de Información Geográfica, Planificación Territorial y
>> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
>> Arloa.
>> dalda at hazi.eus | www.hazi.eus
>> T 945 003 240 – M 627 923 170 – F 945 003 290
>> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>>
>> *********************  LEGE OHARRA   *******************   AVISOLEGAL
>> *******************   DISCLAIMER   *****************************
>> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
>> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
>> kontserbatu gabe.
>> Este mensaje es personal y confidencial y su uso no autorizado está
>> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
>> sin reenviarlo ni conservarlo.
>> This message is personal and confidential, unauthorised use is legally
>> prohibited. If you are not the intended recipient, delete it without
>> resending or backing it.
>>
>> De: alessio.fabiani at gmail.com [mailto:alessio.fabiani at gmail.com] En
>> nombre de Alessio Fabiani
>> Enviado el: miércoles, 17 de febrero de 2016 10:05
>> Para: David Alda Fernandez de Lezea
>> CC: geonode-users at lists.osgeo.org
>> Asunto: Re: [GeoNode-users] Error 405 not permitted
>>
>> Mmm,
>> I'm not fully sure this method is valid
>>
>>  url:"/gs/" + workspace + layer.params.LAYERS
>>
>> I guess /gs/ is a GeoNode Proxy to GeoServer, used by GeoServer itself to
>> get the authorization rules from GeoNode.
>>
>> I'm not fully sure the workspace is supported, but I may be wrong.
>>
>>
>>
>>
>> Best Regards,
>> Alessio Fabiani.
>>
>> ==
>> GeoServer Professional Services from the experts!
>> Visit http://goo.gl/it488V for more information.
>> ==
>>
>> Ing. Alessio Fabiani
>> @alfa7691
>> Founder/Technical Lead
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A
>> 55054  Massarosa (LU)
>> Italy
>> phone: +39 0584 962313
>> fax:     +39 0584 1660272
>> mob:   +39 333 8128928
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>> principi dettati dal D.Lgs. 196/2003.
>>
>> The information in this message and/or attachments, is intended solely
>> for the attention and use of the named addressee(s) and may be confidential
>> or proprietary in nature or covered by the provisions of privacy act
>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>> copying, distribution, or either dissemination, either whole or partial, is
>> strictly forbidden except previous formal approval of the named
>> addressee(s). If you are not the intended recipient, please contact
>> immediately the sender by telephone, fax or e-mail and delete the
>> information in this message that has been received in error. The sender
>> does not give any warranty or accept liability as the content, accuracy or
>> completeness of sent messages and accepts no responsibility  for changes
>> made after they were sent or for other risks which arise as a result of
>> e-mail transmission, viruses, etc.
>> ---------------------------------------------------------------------
>>
>> On Tue, Feb 16, 2016 at 2:11 PM, David Alda Fernandez de Lezea
>> <dalda at hazi.eus> wrote:
>> Yes, I guess so, I haven't changed anything related to GeoNode and
>> Geoserver configuration. Everything is in the same machine.
>>
>> The changes I made in the code are (in red):
>>
>> /usr/local/lib/python2.7/dist-packages/geonode/settings.py
>>
>> LOCAL_GEOSERVER = {
>>         "source": {
>>             "ptype": "gxp_wmscsource",
>>             "url": OGC_SERVER['default']['PUBLIC_LOCATION'] +
>> "geonode/wms",
>>             "restUrl": "/gs/rest"
>>         }
>>     }
>>
>>
>> /var/www/geonode/static/geonode/js/extjs/GeoNode-mixin.js
>>
>> layer.url.indexOf(app.localGeoServerBaseUrl.replace(app.urlPortRegEx,
>> "$1/")) === 0)) {
>>
>>                     var workspace="geonode:";
>>                     if (layer.params.LAYERS.indexOf(":")!=-1){
>>                         workspace = "";
>>                             }
>>                 Ext.Ajax.request({
>>                     /* TODO: use a template variable here if possible */
>>                     url:"/gs/" + workspace + layer.params.LAYERS +
>> "/edit-check",
>>                     method:"POST",
>>                     success:function (response) {
>>                         var result = Ext.decode(response.responseText);
>>                         if (result.authorized === false) {
>>                             toggleButtons(false);
>>                         } else {
>>                             layer.displayOutsideMaxExtent = true;
>>                             toggleButtons(true);
>>                         }
>>                     },
>>                     failure:function () {
>>                         toggleButtons(false);
>>                     }
>>                 });
>>             } else {
>>                 toggleButtons(false);
>>             }
>>
>>
>> Thanks.
>>
>> Regards.
>>
>> Agur bero bat,
>>
>>
>> David Alda Fernández de Lezea
>> Área de Sistemas de Información Geográfica, Planificación Territorial y
>> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
>> Arloa.
>> dalda at hazi.eus | www.hazi.eus
>> T 945 003 240 – M 627 923 170 – F 945 003 290
>> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>> *********************  LEGE OHARRA   *******************   AVISOLEGAL
>> *******************   DISCLAIMER   *****************************
>> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
>> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
>> kontserbatu gabe.
>> Este mensaje es personal y confidencial y su uso no autorizado está
>> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
>> sin reenviarlo ni conservarlo.
>> This message is personal and confidential, unauthorised use is legally
>> prohibited. If you are not the intended recipient, delete it without
>> resending or backing it.
>>
>> De: alessio.fabiani at gmail.com [mailto:alessio.fabiani at gmail.com] En
>> nombre de Alessio Fabiani
>> Enviado el: martes, 16 de febrero de 2016 13:24
>> Para: David Alda Fernandez de Lezea
>> CC: geonode-users at lists.osgeo.org
>> Asunto: Re: [GeoNode-users] Error 405 not permitted
>>
>> Are GeoServer and GeoNode under the same domain? (same hostname and same
>> port)?
>>
>>
>> Best Regards,
>> Alessio Fabiani.
>>
>> ==
>> GeoServer Professional Services from the experts!
>> Visit http://goo.gl/it488V for more information.
>> ==
>>
>> Ing. Alessio Fabiani
>> @alfa7691
>> Founder/Technical Lead
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A
>> 55054  Massarosa (LU)
>> Italy
>> phone: +39 0584 962313
>> fax:     +39 0584 1660272
>> mob:   +39 333 8128928
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>> principi dettati dal D.Lgs. 196/2003.
>>
>> The information in this message and/or attachments, is intended solely
>> for the attention and use of the named addressee(s) and may be confidential
>> or proprietary in nature or covered by the provisions of privacy act
>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>> copying, distribution, or either dissemination, either whole or partial, is
>> strictly forbidden except previous formal approval of the named
>> addressee(s). If you are not the intended recipient, please contact
>> immediately the sender by telephone, fax or e-mail and delete the
>> information in this message that has been received in error. The sender
>> does not give any warranty or accept liability as the content, accuracy or
>> completeness of sent messages and accepts no responsibility  for changes
>> made after they were sent or for other risks which arise as a result of
>> e-mail transmission, viruses, etc.
>> ---------------------------------------------------------------------
>>
>> On Tue, Feb 16, 2016 at 1:02 PM, David Alda Fernandez de Lezea
>> <dalda at hazi.eus> wrote:
>> Hi list,
>>
>> I'm continuing with our GeoNode customization. One of our requirements
>> was to show in the GeoExplorer Local GeoServer combo only the layers from
>> "geonode" workspace. So far I've been able to modify everything and get it
>> working, but I've found an issue while accessing layer details. I get an
>> HTTP 405 error METHOD NOT ALLOWED while accessing
>> http://192.168.1.190/gs/rest/styles
>>
>> HTTP/1.1 405 METHOD NOT ALLOWED
>> Date: Tue, 16 Feb 2016 11:39:17 GMT
>> Server: Apache/2.4.7 (Ubuntu)
>> Vary: Accept-Language,Cookie
>> X-Frame-Options: SAMEORIGIN
>> Content-Language: es
>> Content-Length: 0
>> Keep-Alive: timeout=5, max=100
>> Connection: Keep-Alive
>> Content-Type: text/plain
>>
>> And the layer is not displayed in the preview. Apache doesn't show any
>> error.
>>
>> Can anyone point me to the file(s) that I have to change?
>>
>> Thanks in advance.
>>
>> Regards,
>>
>> Agur bero bat,
>>
>>
>> David Alda Fernández de Lezea
>> Área de Sistemas de Información Geográfica, Planificación Territorial y
>> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
>> Arloa.
>> dalda at hazi.eus | www.hazi.eus
>> T 945 003 240 - M 627 923 170 - F 945 003 290
>> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute - Araba
>>
>> *********************  LEGE OHARRA   *******************   AVISOLEGAL
>> *******************   DISCLAIMER   *****************************
>> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
>> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
>> kontserbatu gabe.
>> Este mensaje es personal y confidencial y su uso no autorizado está
>> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
>> sin reenviarlo ni conservarlo.
>> This message is personal and confidential, unauthorised use is legally
>> prohibited. If you are not the intended recipient, delete it without
>> resending or backing it.
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>>
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>>
>>
>>
>> --
>> Simone
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160218/85e7e043/attachment-0001.html>


More information about the geonode-users mailing list