Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_lattice_shapefile swapped arguments #138

Closed
renanxcortes opened this issue Dec 7, 2018 · 2 comments
Closed

build_lattice_shapefile swapped arguments #138

renanxcortes opened this issue Dec 7, 2018 · 2 comments
Labels
bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. good first contribution

Comments

@renanxcortes
Copy link
Contributor

I was building regular rectangular lattices in one my applications and realized that the arguments of
pysal.weights.build_lattice_shapefile is swapped as follows:

image

The nrows gives the number of columns and vice-versa. The reproducible code would be (in a Jupyter notebook):

import pysal as ps
import geopandas as gpd

%matplotlib inline
ps.weights.build_lattice_shapefile(nrows = 2, ncols = 6, outFileName = 'reg_lat.shp')
lat_2_6 = gpd.read_file('reg_lat.shp')
lat_2_6.plot(edgecolors = 'black')

Best,
Renan

@sjsrey sjsrey transferred this issue from pysal/pysal Mar 4, 2019
@jGaboardi jGaboardi added good first contribution bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. labels Mar 4, 2019
@jGaboardi
Copy link
Member

jGaboardi commented Mar 10, 2019

This appears to have already been resolved. See this gist.

@renanxcortes
Copy link
Contributor Author

renanxcortes commented Mar 10, 2019

Ow, yes, you're right! Thank you for closing this! This was resolved in: e2609a9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug functionality that: returns invalid, erroneous, or meaningless results; or doesn't work at all. good first contribution
Projects
None yet
Development

No branches or pull requests

2 participants