New answers tagged

0

Round-trip the data through a flat projection, ideally one which preserves area, such as Equal Area Cylindrical ('+proj=cea'): df1.to_crs('+proj=cea').centroid.to_crs(df1.crs) This projects the shapes onto a flat surface, which can then be used to find the centroid, and then converts back into the original coordinate system. Choosing a projection Note that ...


0

Figured it out! The code was reading the column names easting and northing, which is why it was throwing me the error. Instead I had to skip over the first line by using line_count += 1 else: if self.device_type == 'BNG':


0

If you only have two possible CRS inputs, and one is a projected system in meters whereas the other one is in decimal degrees, have you thought about using a regex pattern to determine whether the input is one or the other? Here's how you would detect a decimal degree input. Feel free to update the pattern if your input is DMS or something else. Constructing ...


Top 50 recent answers are included