Rumsliga operationer: skapa nya geometrier

Arbeta med geospatial data i Python

Joris Van den Bossche

Open source software developer and teacher, GeoPandas maintainer

Rumsliga operationer

Arbeta med geospatial data i Python

Rumsliga operationer: snitt

Arbeta med geospatial data i Python

Rumsliga operationer: union

Arbeta med geospatial data i Python

Rumsliga operationer: differens

Arbeta med geospatial data i Python

Rumsliga operationer med GeoPandas

africa.head()
           name             geometry
0        Angola  (POLYGON ((23.90...
1       Burundi  POLYGON ((29.339...
2         Benin  POLYGON ((2.6917...
3  Burkina Faso  POLYGON ((2.1544...
4      Botswana  POLYGON ((29.432...

Arbeta med geospatial data i Python

Rumsliga operationer med GeoPandas

print(box)
POLYGON ((60 10, 60 -10, -20 -10, -20 10))

Arbeta med geospatial data i Python

Rumsliga operationer med GeoPandas

africa.intersection(box)

Arbeta med geospatial data i Python

Rumsliga operationer med GeoPandas

africa.head()
           name                                           geometry
0        Angola  (POLYGON ((23.90415368011818 -11.7222815894063...
1       Burundi  POLYGON ((29.33999759290035 -4.499983412294092...
2      Botswana  POLYGON ((29.43218834810904 -22.09131275806759...
...
africa.intersection(box)
0    (POLYGON ((13.22332255001795 -10, 13.120987583...
1    POLYGON ((29.33999759290035 -4.499983412294092...
2                                                   ()
...
dtype: object
Arbeta med geospatial data i Python

Nu kör vi en övning!

Arbeta med geospatial data i Python

Preparing Video For Download...