File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,16 @@ def test_from_geodataframe(self):
123123 w = self .cls .from_dataframe (df , geom_col = "the_geom" , ids = self .idVariable )
124124 self .assertEqual (w [self .known_name ], self .known_namedw )
125125
126+ @ut .skipIf (GEOPANDAS_EXTINCT , "Missing geopandas" )
127+ def test_from_geodataframe_order (self ):
128+ import geopandas
129+
130+ south = geopandas .read_file (pysal_examples .get_path ("south.shp" ))
131+ expected = south .FIPS .iloc [:5 ].tolist ()
132+ for ids_ in ("FIPS" , south .FIPS ):
133+ w = self .cls .from_dataframe (south , ids = ids_ )
134+ self .assertEqual (w .id_order [:5 ], expected )
135+
126136 def test_from_xarray (self ):
127137 w = self .cls .from_xarray (self .da , sparse = False , n_jobs = - 1 )
128138 self .assertEqual (w [self .known_wi_da ], self .known_w_da )
You can’t perform that action at this time.
0 commit comments