427 reputation
211
bio website fgcartographix.com
location Montreal, Canada
age 36
visits member for 1 year, 4 months
seen 2 days ago
stats profile views 26

GIS Analyst and Cartographer


May
10
comment QGIS and Python - create line with multiple points in postgis
I used it to create line from shapes points from gtfs: CREATE TABLE cit.ligne_tr AS SELECT p.shape_id, ST_MakeLine(geom) As geom FROM (SELECT * FROM cit.shapes ORDER BY shape_pt_sequence) p GROUP BY p.shape_id;
May
10
comment QGIS and Python - create line with multiple points in postgis
Could you post your code? I'm not a PostGIS expert, I just happened to use that function 2-3 weeks ago, but it would help.
May
6
answered QGIS and Python - create line with multiple points in postgis
May
3
comment ArcMap is Corrupting my Map Templates
No. I uninstalled ArcGIS 10.0 using "ArcGIS 10.1 Uninstall Utility" (which is supposed to remove everything) and every times I open a .mxd created in 10.0, my toolbar are all messed up. Toolbars are ok though when I create a new map in 10.1. Frustrating.
May
1
awarded  Popular Question
Apr
24
comment Find and replace unicode character in a shapefile
The é are still there only when I try to do something else to (val). Your code works just fine as it is...
Apr
24
accepted Find and replace unicode character in a shapefile
Apr
23
comment Find and replace unicode character in a shapefile
Nope. I've made several tests and I still have streets like "RUE LéOTABLE-DUBUC". The é isn't removed...
Apr
23
comment Find and replace unicode character in a shapefile
For what I understand of your code, I think I could use the model of «rec['properties'][key] = unidecode(val)», I could do «rec['properties'][key] = val.replace('-', ' ')» after the unidecode command... Trying right now! (just so you know I don't want the answer without doing my part! ;) )
Apr
23
awarded  Caucus
Apr
23
awarded  Constituent
Apr
23
comment Find and replace unicode character in a shapefile
I have other string modification to make, remove all "-" in names, change all "Saint-" and "Sainte-" into "S.". Is it possible?
Apr
23
comment Find and replace unicode character in a shapefile
Thanks Sean! I've been looking to take a look at Fiona for a long time. Shapely is so useful, it's a great complement! Now, how to make those string uppercase? ;)
Apr
23
comment Find and replace unicode character in a shapefile
That would be with «shapefile = osgeo.ogr.Open(src_shp, 1)»? Still nothing. Thanks for the help, I'll keep looking.
Apr
23
comment Find and replace unicode character in a shapefile
I remove any encoding/decoding and used «texte_norm = texte_norm.replace('\xc3\x80', 'A') #À» etc. It didn't crash, but there's must be something wrong with my « feat.SetField(fld_shp, texte_norm)» (uncommented as from my example of course), because my shapefile's dbf didn't change... Thanks
Apr
22
asked Find and replace unicode character in a shapefile
Mar
8
comment Arcpy's replaceDataSource Error
Thanks. It's all 32-bit, so it can't be the issue, but I'll keep that in mind when I'll try 64-bit geoprocessing. For now, I've left that part out of my script and replaced the source by hand... :(
Mar
6
answered QGIS Python Intro Text
Feb
26
comment find and replace, field calculator
Or !FieldName!.replace("Old Value", "New Value"). Don't forget to select the python parser.
Jan
24
awarded  Critic