본문 바로가기
GIS Tech/GIS Data Process

Useful Python GIS Skills 2

by mpv 2023. 11. 2.

1. Using Mapbox basemap on Cartoframes

from cartoframes.viz import *
from cartoframes.viz import basemaps

Map([
    Layer(ftgdf, color_continuous_style('AWATER20')),
    Layer(house_gdf, color_continuous_style('price'))
    
], basemap=basemaps.voyager)

 

sample basemaps you may try:

 

streetmap = {
    'style': 'mapbox://styles/mapbox/streets-v9',
    'token': 'pk.something'
}
mybasemap = {
    #'style': 'mapbox://styles/mapbox/streets-v9',
    'style': 'mapbox://styles/mapbox/satellite-v9',
    'token': 'pk.something'
}

 

 

2. Geopandas convex hull of geometries

 

house_hull = house_gdf.geometry.unary_union.convex_hull

댓글