Hot answers tagged

4

You need to load all your municipalities and zip codes from your CSV into a dictionary, and then in an update cursor loop through your GDB table, look up each municipality in the dictionary and write the corresponding dictionary zip value into the ZIP column of your GDB table. This assumes columns in your CSV called "City" and "ZIP". import arcpy ...


3

To me, you need to make a join between your main shapefile that contains the common names only with the CSV file. I would do that this way: Load your CSV file into your QGIS project (Layer > Add layer > Add delimited text layer) and specify that field delimitations are semi-colons and that it is a non-geometric layer. Make a join between your shapefile and ...


2

It seems that Spatialite's ST_LocateAlong function only returns a value if the searched value is directly found on a vertex. It does not interpolate between vertices. It's what's written in Spatialite's manual: ST_LocateAlong( geom Geometry , m_value Double precision ) : Geometry Return a derived geometry collection value with elements that match ...


2

Have you tried using Notepad as an in-between-step? After creating your excel file, copy everything in a notepad file, then choose "save as". Make sure that you change the type of file as "All files", then the name of your file must be prompted like "name.csv". (you must use " " for the filename) EDIT: yes, if you copy directly from Excel the data ...


2

QGIS can import the .txt file as is, you don't have to convert it to a .csv and thus possibly corrupt the tabulation. Ssing the add delimited text layer layer creation box, you can see that it recognizes .txt as one of the acceptable formats.


1

As csv isn't an arcpy module, it can't see arcpy.env.workspace to know your workspace path. Because of that it's looking for COTS_234AR.csv and not M:\GIS\FinalExam\COTS_234AR.csv (or whatever your workspace path is). You need to pass input as a full path to the csv, not just the csv name. import os # Add os to your imports for csv in csvs: #set ...


1

Here is a very useful ESRI blog you (and anyone else) who intends to link data held in Excel with ArcMap should read. It explains the many pitfalls there are with Excel. I personal avoid using Excel like the plague and get my data into personal geodatabase which is essentially a spatial enabled Access database. Much easier to read and write from and you ...


1

Be sure of the type of your columns (date sometimes crash) and their names (no space, no special characters). It could also be the encoding (make a try with UTF8.) or your csv delimiter.



Only top voted, non community-wiki answers of a minimum length are eligible