Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a database which i've exported as individual csv files for each table.

Below are some of the attributes which exist from two of the csv files:

wayPointID  linkID  order   x   y   z   length  radius

and

nodeID  x   y   z   name    description type

I'm in need of a method to convert this data into osm.

When I attempt just csv -> osm in fme, of course the output is only the osm xml headers.

<?xml version="1.0" encoding="UTF-8"?>

I have been able to use 2DPointReplacer to take the x and y attributes and it successfully outputs nodes.

However, he data I have does require the tables be joined in order to build attributes. Because of this I have to create a new id to each position and be ordered/continued across several tables.

I have written a python script which will do what I need but would like this done in FME.

Can anyone offer suggestions?

Thanks in advance.

share|improve this question

2 Answers 2

To join the tables use featureMerger using the ID as key match. To create ID's use the counter.

hope it helps Regards Jorge Vidinha

share|improve this answer
    
Thanks for responding. I've implement the Counter transformer to create a new id for each position across two datasets. I notice however when it writes to the file from the counter output, the ordering of the positions, switches from dataset to dataset, like it was 'simulatneous processing', process 1 from dataset 1 then process from dataset 2. Can this be forced to finish one dataset at a time? –  Pat Sep 20 '11 at 5:52
    
Yes you can force FME to read your datasets one after the other, on the navigator right click on the readers and chose move up or down on the list , fme reads datasets from top to botom then counter as first transformer in workspace shoudl make the count as you describe. good luck. Jorge Vidinha –  Jorge Vidinha Sep 21 '11 at 10:57

You better off converting your csv file to shapefile [it uses python]

Then you can use Shp2osm

"This article is about the shp2osm.pl and polyshp2osm.py family of conversion scripts which convert shapefiles to OSM files. For the general process regarding importing shapefiles along with alternative scripts "

more details on Christopher Schmidt (the author of Shposm) blog

http://crschmidt.net/blog/archives/354/polyshp2osm/

share|improve this answer
    
hi, I have tried exporting into shape and it was successful when only doing points. When it comes to lines, it's more difficult because in my datasets, a line is comprised of data from multiple datasets/multiple csv files. –  Pat Sep 20 '11 at 5:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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