3

I'm working with a naive geometry column imported from a csv file, like this:

      name       geometry                                           id  
1     Abubilla  (POLYGON ((424405.897979997 4584795.70258297, ...   83
28    Abubilla  (POLYGON ((428405.900406701 4584295.67145889, ...   83
29    Abubilla  (POLYGON ((428405.919365087 4586795.67527349, ...   83  
... ... ... ... ... ...
9808  Zarcero   (POLYGON ((424905.883573821 4582795.69571411, ...   40
9809  Zarcero   (POLYGON ((425405.880556747 4582295.69113956, ...   40  
9810  Zarcero   (POLYGON ((425405.888148001 4583295.69267462, ...   40  

When I try to set the CRS by the crs function:

gdf.crs({'init': 'epsg:25831'})

it yields this error message:

TypeError: 'NoneType' object is not callable

Could it be that Python doesn't recognize the geometry? Is there another way to set the coordinates system for this "naive geometry"?

closed as off-topic by Kadir Şahbaz, Vince, whyzar, Fran Raga, BERA Jul 13 at 13:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Kadir Şahbaz, Vince, whyzar, Fran Raga, BERA
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Answers to this question might help you: stackoverflow.com/questions/55390492/… – TomazicM Jun 28 at 11:35
  • Indeed the first answer worked it out. My mistake was to directly asign the crs to a variable through a function. I shoul state it as: gdf.crs = {'init': 'epsg:25831'} thanks – Rodrigo Vargas Jun 28 at 15:36
1

The first answer to this question on Stackoverflow solved it.

The mistake was to directly assign the crs to a variable through a function. It should be stated as:

gdf.crs = {'init': 'epsg:25831'}

(Paraphrased from comments by users TomazicM and Rodrigo Vargas)

Not the answer you're looking for? Browse other questions tagged or ask your own question.