[GeoNode-users] Metadata Import with PyCSW

Ariel Nunez ingenieroariel at gmail.com
Wed Sep 23 05:12:12 PDT 2015


Jonas,

I would be very interested to check out the script.

Thanks for the offer,
Ariel.

On Wed, Sep 23, 2015 at 6:47 AM, Jonáš Veselka <jonas.veselka at gisat.cz>
wrote:

> Dear Ariel and others,
> two months ago, I asked You to help with my task to move metadata from
> GeoNode 1.2 to GeoNode 2.4. You have posted some good advices, that pushed
> me, but I didn't manage to do it that way.
> I'am sorry, I didn't respond anymore. After trying many dead ends, I
> finaly moved metadata by writing a python script to simulate POST requests
> of GeoNode metadata form, for each layer. It is very specific for our needs
> (some fields are constant, some are omitted), but if anyone is fighting
> this issue, I can post the script.
> Thanks,
> Jonáš
>
> 2015-07-22 18:06 GMT+02:00 Ariel Nunez <ingenieroariel at gmail.com>:
>
>> Jonas,
>>
>> I think you can do something like this:
>>
>> first type: python manage.py shell
>>
>> and then try to replicate the following lines with the information in the
>> xml field:
>>
>> https://github.com/GeoNode/geonode/blob/master/geonode/layers/utils.py#L425
>>
>> The basic idea is to iterate over the values, set them in the model and
>> then save.
>>
>> -a
>>
>> On Wed, Jul 22, 2015 at 9:25 AM, Jonáš Veselka <jonas.veselka at gisat.cz>
>> wrote:
>>
>>> Hi,
>>> I'm trying to find out how to import metadata.
>>>
>>> I'm using GeoNode 2.4b24 with built-in PyCSW. I need to transfer
>>> metadata from an old app on GeoNode 1.2 and GeoNetwork.
>>>
>>> I was thinking about and trying many ways but it always was too
>>> complicated or somehow impossible. Until I've got an advice from Ariel
>>> Núñez to place whole XML contents in the field *metadata_xml*, set
>>> *metadata_uploaded* to true and call PyCSW internals. But how and what
>>> to call to redistribute metadata in proper places?
>>> I tried to call *geonode updatelayers -f name_of_the_layer* but it
>>> didn't change anything.
>>>
>>>
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150923/02af502d/attachment.html>


More information about the geonode-users mailing list