Skip to content Skip to sidebar Skip to footer

How To Encode Xml Into Esri Shapefiles Using Python?

I prepared the following Python script to this XML into ESRI Shapefiles. The starting point for the script was this post. #!/usr/bin/env python # -*- coding: utf-8 -*- # # Requires

Solution 1:

I can only comment on your second issue, which is that your url values are being cut off. You need to specify the field length, e.g. writer.field('url', size=255)

Solution 2:

For the first issue, try removing the line value = value.replace(u'\xdf', u' ')

This worked for me and I successfully could generate the shapefile with attributes containing special characters.

Post a Comment for "How To Encode Xml Into Esri Shapefiles Using Python?"