librelist archives

« back to archive

Deleting Layers

Deleting Layers

From:
Smitha V
Date:
2011-03-30 @ 08:20
Why is it that even after deleting the layers, they appear on the list? It
says its stored on remote server. How do i make sure that they don't appear
on the list of advanced search?

-- 
Regards
Smitha V (MT2009149)
2nd Year MTech
IIITB

Re: [geonode] Deleting Layers

From:
David Winslow
Date:
2011-03-30 @ 12:36
This sounds like a bug - steps to reproduce it would be useful.

Layers deleted in the Django application should also be removed from
GeoNetwork by the pre_delete signal registered at the end of maps/models.py
. Ultimately, this means that the delete_layer method in
src/GeoNodePy/geonode/geonetwork.py is called, which doesn't do much in the
way of error checking.

As far as I know we don't currently provide a way to clean out orphaned
GeoNetwork records like this, but the basic approach should be pretty
simple:

records = get all records from geonetwork
for rec in records:
    geonode_record = models.Layer.objects.find(uuid = rec.fileIdentifier)
    if geonode_record is None:
       delete rec from geonetwork

This is just pseudocode mixed with Python, so it won't run, but it should be
enough to get you started on cleaning up your GeoNetwork.  If you are
unfamiliar with the CSW protocol, the GeoNode trac wiki has some notes on
the operations available:
http://dev.geonode.org/trac/wiki/CSW_client_implementation_guidelines

I'll go ahead and create a ticket in the geonode bug tracker, but I'm not
sure how long it will be before someone is able to investigate it.  If you
can add a step-by-step description of how to demonstrate the problem, that
will make it easier when a developer is able to look at it.

http://dev.geonode.org/trac/ticket/932

--
David Winslow
OpenGeo - http://opengeo.org/

On Wed, Mar 30, 2011 at 4:20 AM, Smitha V <smitha.v@iiitb.net> wrote:

> Why is it that even after deleting the layers, they appear on the list? It
> says its stored on remote server. How do i make sure that they don't appear
> on the list of advanced search?
>
> --
> Regards
> Smitha V (MT2009149)
> 2nd Year MTech
> IIITB
>
>

Re: [geonode] Deleting Layers

From:
Paul Bartsch
Date:
2011-10-28 @ 15:30
I'm having a problem deleting layers --similar to a topic from 2011-03-30--
and I'm wondering if this is because I use a separate login for GeoNetwork
from my GeoNode superuser login. Should changing the password of the
GeoNetwork login be added to the docs?
http://readthedocs.org/docs/geonode/en/latest/deploy/production.html

I uploaded data successfully at first, but the last couple of Shapefiles I
attempted had errors on the upload.  Although there were upload errors for
these two features, they still show up in my Data list.  When I attempt to
delete through the GeoNode interface with my superuser account I receive an
internal server error.  I was able to delete the problem features from
Geoserver, but --even after a restart of Apache-- they still show up in my
GeoNode.  So I deleted the problem data from the GeoNetwork which did work.

I looked through the logs as described here:
http://docs.geonode.org/en/latest/deploy/debug.html  but didn't find any
clues.

Thanks in advance,
---
Paul Bartsch

Re: [geonode] Deleting Layers

From:
David Winslow
Date:
2011-10-28 @ 15:34
Yes changing the GeoNetwork login from the defaults would cause a problem,
and yes it should be listed in the documentation.  It's probably also the
cause of your upload errors.

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Oct 28, 2011 at 11:30 AM, Paul Bartsch <pdbartsch@gmail.com> wrote:

> I'm having a problem deleting layers --similar to a topic from 2011-03-30--
> and I'm wondering if this is because I use a separate login for GeoNetwork
> from my GeoNode superuser login. Should changing the password of the
> GeoNetwork login be added to the docs?
> http://readthedocs.org/docs/geonode/en/latest/deploy/production.html
>
> I uploaded data successfully at first, but the last couple of Shapefiles I
> attempted had errors on the upload.  Although there were upload errors for
> these two features, they still show up in my Data list.  When I attempt to
> delete through the GeoNode interface with my superuser account I receive an
> internal server error.  I was able to delete the problem features from
> Geoserver, but --even after a restart of Apache-- they still show up in my
> GeoNode.  So I deleted the problem data from the GeoNetwork which did work.
>
> I looked through the logs as described here:
> http://docs.geonode.org/en/latest/deploy/debug.html  but didn't find any
> clues.
>
> Thanks in advance,
> ---
> Paul Bartsch
>
>

Re: [geonode] Deleting Layers

From:
Paul Bartsch
Date:
2011-10-28 @ 16:07
To clarify: I have not changed the GeoNetwork login.  When I view the
local_settings.py file the credential are still the default:

GEONETWORK_CREDENTIALS = 'admin', 'admin'

Should I change the GEONETWORK_CREDENTIALS to match my GeoNode superuser?

Thanks for your help,
---
Paul Bartsch



On Fri, Oct 28, 2011 at 8:34 AM, David Winslow <dwinslow@opengeo.org> wrote:

> Yes changing the GeoNetwork login from the defaults would cause a problem,
> and yes it should be listed in the documentation.  It's probably also the
> cause of your upload errors.
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
>
> On Fri, Oct 28, 2011 at 11:30 AM, Paul Bartsch <pdbartsch@gmail.com>wrote:
>
>> I'm having a problem deleting layers --similar to a topic from 2011-03-30--
>> and I'm wondering if this is because I use a separate login for
>> GeoNetwork from my GeoNode superuser login. Should changing the password of
>> the GeoNetwork login be added to the docs?
>> http://readthedocs.org/docs/geonode/en/latest/deploy/production.html
>>
>> I uploaded data successfully at first, but the last couple of Shapefiles I
>> attempted had errors on the upload.  Although there were upload errors for
>> these two features, they still show up in my Data list.  When I attempt to
>> delete through the GeoNode interface with my superuser account I receive an
>> internal server error.  I was able to delete the problem features from
>> Geoserver, but --even after a restart of Apache-- they still show up in my
>> GeoNode.  So I deleted the problem data from the GeoNetwork which did work.
>>
>> I looked through the logs as described here:
>> http://docs.geonode.org/en/latest/deploy/debug.html  but didn't find any
>> clues.
>>
>> Thanks in advance,
>> ---
>> Paul Bartsch
>>
>>
>

Re: [geonode] Deleting Layers

From:
David Winslow
Date:
2011-10-28 @ 16:09
No, GeoNode currently *does not* synchronize GeoNetwork users with GeoNode
user accounts.  Whatever credentials you use to log into GeoNetwork through
the web are the same ones that should be in the GeoNode config.

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Oct 28, 2011 at 12:07 PM, Paul Bartsch <pdbartsch@gmail.com> wrote:

> To clarify: I have not changed the GeoNetwork login.  When I view the
> local_settings.py file the credential are still the default:
>
> GEONETWORK_CREDENTIALS = 'admin', 'admin'
>
> Should I change the GEONETWORK_CREDENTIALS to match my GeoNode superuser?
>
> Thanks for your help,
> ---
> Paul Bartsch
>
>
>
> On Fri, Oct 28, 2011 at 8:34 AM, David Winslow <dwinslow@opengeo.org>wrote:
>
>> Yes changing the GeoNetwork login from the defaults would cause a problem,
>> and yes it should be listed in the documentation.  It's probably also the
>> cause of your upload errors.
>>
>> --
>> David Winslow
>> OpenGeo - http://opengeo.org/
>>
>>
>> On Fri, Oct 28, 2011 at 11:30 AM, Paul Bartsch <pdbartsch@gmail.com>wrote:
>>
>>> I'm having a problem deleting layers --similar to a topic from 2011-03-30--
>>> and I'm wondering if this is because I use a separate login for
>>> GeoNetwork from my GeoNode superuser login. Should changing the password of
>>> the GeoNetwork login be added to the docs?
>>> http://readthedocs.org/docs/geonode/en/latest/deploy/production.html
>>>
>>> I uploaded data successfully at first, but the last couple of Shapefiles
>>> I attempted had errors on the upload.  Although there were upload errors for
>>> these two features, they still show up in my Data list.  When I attempt to
>>> delete through the GeoNode interface with my superuser account I receive an
>>> internal server error.  I was able to delete the problem features from
>>> Geoserver, but --even after a restart of Apache-- they still show up in my
>>> GeoNode.  So I deleted the problem data from the GeoNetwork which did work.
>>>
>>> I looked through the logs as described here:
>>> http://docs.geonode.org/en/latest/deploy/debug.html  but didn't find any
>>> clues.
>>>
>>> Thanks in advance,
>>> ---
>>> Paul Bartsch
>>>
>>>
>>
>