Warning in st_intersection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Warning in st_intersection

Sergio Ibarra
Hello everyone

In my work, I use to intersect polygon grids with lines or points. I use
the package "sf" with the function 'st_intersection". However, every time I
run st_intersection I got the following Warning Message:

Warning message:attribute variables are assumed to be spatially
constant throughout all geometries


What does this warning mean?

Thanks
--
​Sergio Ibarra Espinosa
Doutorando em Meteorologia
Instituto de Astronomia, Geofísica e Ciências Atmosféricas
Universidade de São Paulo
Rua do Matão, 1226
Cidade Universitária
São Paulo-SP - Brasil -
05508-090
+55-11-3091-2833
+55-11-97425-3791
Skype: sergio_ibarra1
Blog: www.sergioibarra.blogspot.com


[image: photo]
*Sergio Ibarra Espinosa*
MSc, Departamento de Ciências Atmosféricas, Universidade de São Paulo
+ 55 11 3091-4731 <+%2055%2011%203091-4731> | +55 11 974 253 791
<+55%2011%20974%20253%20791> | [hidden email] |
www.sergioibarra.blogspot.com | Skype: sergio_ibarra1 <#> | Rua do Matão,
1226 - Cidade Universitária São Paulo-SP - Brasil - 05508-090
<http://us.linkedin.com/in/sibarra>  <http://twitter.com/sergio_ibarra>
<http://plus.google.com/+SergioIbarraEspinosa>  <http://github.com/xhie>
<http://wiseintro.co/sergioibarra>
Get a signature like this: Click here!
<http://ws-promos.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS9lbWFpbC1pbnN0YWxsP3dzX25jaWQ9NjcyMjk0MDA4JnV0bV9zb3VyY2U9ZXh0ZW5zaW9uJnV0bV9tZWRpdW09ZW1haWwmdXRtX2NhbXBhaWduPXByb21vXzU3MzI1Njg1NDg3Njk3OTIiLCAiZSI6ICI1NzMyNTY4NTQ4NzY5NzkyIn0=&u=651454521820988>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Warning in st_intersection

edzer


On 06/07/17 16:16, Sergio Ibarra wrote:

> Hello everyone
>
> In my work, I use to intersect polygon grids with lines or points. I use
> the package "sf" with the function 'st_intersection". However, every time I
> run st_intersection I got the following Warning Message:
>
> Warning message:attribute variables are assumed to be spatially
> constant throughout all geometries
>
>
> What does this warning mean?
Attribute values are assigned to sub-geometries; if these are spatially
constant, as for instance for land use, then this is fine. If they are
aggregates, such as population count, then this is not fine, wrong even.
By default, they are set to NA.

e.g.

demo(nc)
st_agr(nc) = "constant"

takes away the warning, as it sets all attribute values (in this case
wrongly) to "constant", as of their agr value (agr standing for
"attribute geometry relationship").

More here:
https://cran.r-project.org/web/packages/sf/vignettes/sf1.html#how-attributes-relate-to-geometries

>
> Thanks
>

--
Edzer Pebesma
Institute for Geoinformatics  (ifgi),  University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
Journal of Statistical Software:   http://www.jstatsoft.org/
Computers & Geosciences:   http://elsevier.com/locate/cageo/


_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

signature.asc (484 bytes) Download Attachment
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Warning in st_intersection

Sergio Ibarra
So, I need to know the attribute geometry relationship (agr) (constant,
aggregate or identity)  of each variable of mine data set

Thank you Edzer


[image: photo]
*Sergio Ibarra Espinosa*
MSc Environment, PhD Meteorology, Departamento de Ciências Atmosféricas,
Universidade de São Paulo
+ 55 11 3091-4731 | +55 11 974 253 791 | [hidden email] |
www.sergioibarra.blogspot.com | Skype: sergio_ibarra1 <#> | Rua do Matão,
1226 - Cidade Universitária São Paulo-SP - Brasil - 05508-090
<http://github.com/ibarraespinosa> <http://us.linkedin.com/in/sibarra>
<http://wiseintro.co/sergioibarra> <http://blogger.com/profile/sergioibarra>
Get your own email signature
<https://wisestamp.com/email-install?utm_source=promotion&utm_medium=signature&utm_campaign=get_your_own>

Em qui, 6 de jul de 2017 às 12:37, Edzer Pebesma <
[hidden email]> escreveu:

>
>
> On 06/07/17 16:16, Sergio Ibarra wrote:
> > Hello everyone
> >
> > In my work, I use to intersect polygon grids with lines or points. I use
> > the package "sf" with the function 'st_intersection". However, every
> time I
> > run st_intersection I got the following Warning Message:
> >
> > Warning message:attribute variables are assumed to be spatially
> > constant throughout all geometries
> >
> >
> > What does this warning mean?
>
> Attribute values are assigned to sub-geometries; if these are spatially
> constant, as for instance for land use, then this is fine. If they are
> aggregates, such as population count, then this is not fine, wrong even.
> By default, they are set to NA.
>
> e.g.
>
> demo(nc)
> st_agr(nc) = "constant"
>
> takes away the warning, as it sets all attribute values (in this case
> wrongly) to "constant", as of their agr value (agr standing for
> "attribute geometry relationship").
>
> More here:
>
> https://cran.r-project.org/web/packages/sf/vignettes/sf1.html#how-attributes-relate-to-geometries
>
> >
> > Thanks
> >
>
> --
> Edzer Pebesma
> Institute for Geoinformatics  (ifgi),  University of Münster
> Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 33081
> <+49%20251%208333081>
> Journal of Statistical Software:   http://www.jstatsoft.org/
> Computers & Geosciences:   http://elsevier.com/locate/cageo/
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

--
​Sergio Ibarra Espinosa
Doutorando em Meteorologia
Instituto de Astronomia, Geofísica e Ciências Atmosféricas
Universidade de São Paulo
Rua do Matão, 1226
Cidade Universitária
São Paulo-SP - Brasil -
05508-090
+55-11-3091-2833
+55-11-97425-3791
Skype: sergio_ibarra1
Blog: www.sergioibarra.blogspot.com


[image: photo]
*Sergio Ibarra Espinosa*
MSc, Departamento de Ciências Atmosféricas, Universidade de São Paulo
+ 55 11 3091-4731 <+%2055%2011%203091-4731> | +55 11 974 253 791
<+55%2011%20974%20253%20791> | [hidden email] |
www.sergioibarra.blogspot.com | Skype: sergio_ibarra1 <#> | Rua do Matão,
1226 - Cidade Universitária São Paulo-SP - Brasil - 05508-090
<http://us.linkedin.com/in/sibarra>  <http://twitter.com/sergio_ibarra>
<http://plus.google.com/+SergioIbarraEspinosa>  <http://github.com/xhie>
<http://wiseintro.co/sergioibarra>
Get a signature like this: Click here!
<http://ws-promos.appspot.com/r?rdata=eyJydXJsIjogImh0dHA6Ly93d3cud2lzZXN0YW1wLmNvbS9lbWFpbC1pbnN0YWxsP3dzX25jaWQ9NjcyMjk0MDA4JnV0bV9zb3VyY2U9ZXh0ZW5zaW9uJnV0bV9tZWRpdW09ZW1haWwmdXRtX2NhbXBhaWduPXByb21vXzU3MzI1Njg1NDg3Njk3OTIiLCAiZSI6ICI1NzMyNTY4NTQ4NzY5NzkyIn0=&u=651454521820988>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Loading...