[Python] Resize shapefile

Discussão em 'Python' iniciado por Stack, Junho 30, 2025.

  1. Stack

    Stack Membro Participativo

    I have a shapefile for each US state and I would like to add all shapefiles together which I do using Basemap and readshapefile and so on. Now my problem is that Alaska is huge and doesn't fit into the map. I would like to add Alaska extra in the west of Texas (left bottom corner) which is the normal approach to solve this problem. Therefore I manipulated the shapefile of Alaska to move the shape using this code:

    for t in range(len(shape)):
    l = list(shape[t])
    l[1] -= 4000000
    l[0] += 1000000
    tup = tuple(l)
    shape[t] = tup


    Well as I mentioned Alaska is huge so is there any easy way to resize the shapefile?

    Thanks for your ideas!

    Edit:

    Some additional information: I am using the whole thing to visualize the Census 2013 data. My current output looks like this:

    [​IMG]

    Projection: Albers Equal Areas

    Continue reading...

Compartilhe esta Página