[GeoNode-devel] Are visible attributes of a datasets available by API? (Henning Bredel)

Toni Schönbuchner toni.schoenbuchner at csgis.de
Mon Nov 13 12:58:44 PST 2023


Hi Hennig,

thanks for your reply. attribute_set was what I was looking for.
Guess I was blind ;))

Thanks!

Toni

> Am 13.11.2023 um 21:00 schrieb geonode-devel-request at lists.osgeo.org:
> 
> Send geonode-devel mailing list submissions to
> 	geonode-devel at lists.osgeo.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.osgeo.org/mailman/listinfo/geonode-devel
> or, via email, send a message with subject or body 'help' to
> 	geonode-devel-request at lists.osgeo.org
> 
> You can reach the person managing the list at
> 	geonode-devel-owner at lists.osgeo.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of geonode-devel digest..."
> Today's Topics:
> 
>   1. Re: Are visible attributes of a datasets available by API?
>      (Henning Bredel)
> 
> Von: Henning Bredel <h.bredel at 52north.org>
> Betreff: Aw: [GeoNode-devel] Are visible attributes of a datasets available by API?
> Datum: 13. November 2023 um 09:36:27 MEZ
> An: geonode-devel at lists.osgeo.org
> 
> 
> TBH I do not know how feature info template and the attribute_set of a dataset corresponds in detail. However, /api/v2 includes the attributes via attribute_set array which were formally available as layer_details via the feature catalogue (Django template).
> 
> I assume you are setting visibility of attributes in the GeoServer?
> 
> Best
> 
>  Henning
> 
> On 08.11.23 21:21, Toni Schönbuchner via geonode-devel wrote:
>> Thanks Henning,
>> But this only exposes the html feature info template, right?
>> https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/api/serializers.py#L220 <https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/api/serializers.py#L220>
>> I would search for a json representation of the visible attributes a User has chosen for a dataset
>> F.e. with:
>> https://stable.demo.geonode.org/api/datasets/8620/ <https://stable.demo.geonode.org/api/datasets/8620/>
>> Best regards
>> Toni
>> -----------------------------------------------
>> CSGIS
>> -----------------------------------------------
>> Spinnereistraße 7
>> Halle 18 04179 Leipzig
>> -----------------------------------------------
>> Webhttps://csgis.de
>> -----------------------------------------------
>> Hinweis gemäß § 33 BDSG
>> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den
>> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich
>> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht
>> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,
>> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>>> Am 08.11.2023 um 21:00 schrieb geonode-devel-request at lists.osgeo.org:
>>> 
>>> Send geonode-devel mailing list submissions to
>>> geonode-devel at lists.osgeo.org
>>> 
>>> To subscribe or unsubscribe via the World Wide Web, visit
>>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>>> or, via email, send a message with subject or body 'help' to
>>> geonode-devel-request at lists.osgeo.org
>>> 
>>> You can reach the person managing the list at
>>> geonode-devel-owner at lists.osgeo.org
>>> 
>>> When replying, please edit your Subject line so it is more specific
>>> than "Re: Contents of geonode-devel digest..."
>>> Today's Topics:
>>> 
>>>   1. Are visible attributes of a datasets available by API?
>>>      (Toni Sch?nbuchner)
>>>   2. Re: Are visible attributes of a datasets available by API?
>>>      (Henning Bredel)
>>>   3. Re: Are visible attributes of a datasets available by API?
>>>      (Henning Bredel)
>>> 
>>> *Von: *Toni Schönbuchner <toni.schoenbuchner at csgis.de>
>>> *Betreff: **[GeoNode-devel] Are visible attributes of a datasets available by API?*
>>> *Datum: *8. November 2023 um 14:01:51 MEZ
>>> *An: *geonode-devel at lists.osgeo.org
>>> 
>>> 
>>> Hi,
>>> 
>>> I haven’t found anything but before I give up:
>>> 
>>> Does one know if the attributes model is currently
>>> exposed over api V2?
>>> 
>>> https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L386 <https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L386>
>>> 
>>> Background is to get all visible attributes of a datased
>>> based on the user selection.
>>> 
>>> Best regards
>>> 
>>> Toni
>>> 
>>> -----------------------------------------------
>>> CSGIS
>>> 
>>> -----------------------------------------------
>>> Spinnereistraße 7
>>> Halle 18 04179 Leipzig
>>> -----------------------------------------------
>>> Webhttps://csgis.de
>>> -----------------------------------------------
>>> 
>>> Hinweis gemäß § 33 BDSG
>>> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den
>>> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich
>>> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht
>>> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,
>>> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>>> 
>>> 
>>> 
>>> 
>>> *Von: *Henning Bredel <h.bredel at 52north.org>
>>> *Betreff: **Aw: [GeoNode-devel] Are visible attributes of a datasets available by API?*
>>> *Datum: *8. November 2023 um 14:38:17 MEZ
>>> *An: *geonode-devel at lists.osgeo.org
>>> 
>>> 
>>> Have a look here:
>>> 
>>> https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/api/serializers.py#L56
>>> 
>>> or
>>> 
>>> https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L195
>>> 
>>> Best
>>> 
>>>  Henning
>>> 
>>> On 08.11.23 14:36, Henning Bredel wrote:
>>>> Toni,
>>>> as far as I can see, these are serialized as attribute_set, aren't they?
>>>> Not sure, though, how these could be marked visible or not.
>>>> Best
>>>>   Henning
>>>> On 08.11.23 14:01, Toni Schönbuchner via geonode-devel wrote:
>>>>> Hi,
>>>>> 
>>>>> I haven’t found anything but before I give up:
>>>>> 
>>>>> Does one know if the attributes model is currently
>>>>> exposed over api V2?
>>>>> 
>>>>> https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L386 <https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L386>
>>>>> 
>>>>> Background is to get all visible attributes of a datased
>>>>> based on the user selection.
>>>>> 
>>>>> Best regards
>>>>> 
>>>>> Toni
>>>>> 
>>>>> -----------------------------------------------
>>>>> CSGIS
>>>>> 
>>>>> -----------------------------------------------
>>>>> Spinnereistraße 7
>>>>> Halle 18 04179 Leipzig
>>>>> -----------------------------------------------
>>>>> Webhttps://csgis.de
>>>>> -----------------------------------------------
>>>>> 
>>>>> Hinweis gemäß § 33 BDSG
>>>>> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den
>>>>> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich
>>>>> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht
>>>>> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,
>>>>> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> geonode-devel mailing list
>>>>> geonode-devel at lists.osgeo.org
>>>>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>>> 
>>> -- 
>>> Henning Bredel
>>> 52°North Spatial Information Research GmbH
>>> Martin-Luther-King-Weg 24
>>> 48155 Münster, Germany
>>> E-Mail: h.bredel at 52north.org
>>> http://52north.org/
>>> Twitter: @FiveTwoN
>>> Managing Directors:
>>> Dr. Benedikt Gräler, Dr. Simon Jirka, Matthes Rieke
>>> Local Court Muenster HRB 10849
>>> 
>>> 
>>> 
>>> *Von: *Henning Bredel <h.bredel at 52north.org>
>>> *Betreff: **Aw: [GeoNode-devel] Are visible attributes of a datasets available by API?*
>>> *Datum: *8. November 2023 um 14:36:51 MEZ
>>> *An: *geonode-devel at lists.osgeo.org
>>> 
>>> 
>>> Toni,
>>> 
>>> as far as I can see, these are serialized as attribute_set, aren't they?
>>> 
>>> Not sure, though, how these could be marked visible or not.
>>> 
>>> Best
>>> 
>>>  Henning
>>> 
>>> On 08.11.23 14:01, Toni Schönbuchner via geonode-devel wrote:
>>>> Hi,
>>>> I haven’t found anything but before I give up:
>>>> Does one know if the attributes model is currently
>>>> exposed over api V2?
>>>> https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L386 <https://github.com/GeoNode/geonode/blob/96d72df6fa3f216e9f40ed33472e82048db8b06a/geonode/layers/models.py#L386>
>>>> Background is to get all visible attributes of a datased
>>>> based on the user selection.
>>>> Best regards
>>>> Toni
>>>> -----------------------------------------------
>>>> CSGIS
>>>> -----------------------------------------------
>>>> Spinnereistraße 7
>>>> Halle 18 04179 Leipzig
>>>> -----------------------------------------------
>>>> Webhttps://csgis.de
>>>> -----------------------------------------------
>>>> Hinweis gemäß § 33 BDSG
>>>> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den
>>>> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich
>>>> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht
>>>> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung,
>>>> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>>>> _______________________________________________
>>>> geonode-devel mailing list
>>>> geonode-devel at lists.osgeo.org
>>>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>>> 
>>> -- 
>>> Henning Bredel
>>> 52°North Spatial Information Research GmbH
>>> Martin-Luther-King-Weg 24
>>> 48155 Münster, Germany
>>> E-Mail: h.bredel at 52north.org
>>> http://52north.org/
>>> Twitter: @FiveTwoN
>>> Managing Directors:
>>> Dr. Benedikt Gräler, Dr. Simon Jirka, Matthes Rieke
>>> Local Court Muenster HRB 10849
>>> 
>>> 
>>> _______________________________________________
>>> geonode-devel mailing list
>>> geonode-devel at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>> _______________________________________________
>> geonode-devel mailing list
>> geonode-devel at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/geonode-devel
> 
> -- 
> Henning Bredel
> 52°North Spatial Information Research GmbH
> Martin-Luther-King-Weg 24
> 48155 Münster, Germany
> E-Mail: h.bredel at 52north.org
> http://52north.org/
> Twitter: @FiveTwoN
> Managing Directors:
> Dr. Benedikt Gräler, Dr. Simon Jirka, Matthes Rieke
> Local Court Muenster HRB 10849
> 
> 
> _______________________________________________
> geonode-devel mailing list
> geonode-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20231113/47ddfa7f/attachment.htm>


More information about the geonode-devel mailing list