[mapserver-users] join shp with csv

Jörg Thomsen jt at mapmedia.de
Thu Mar 13 03:07:49 PDT 2014


hi again,

I am still preparing my MapServer workshop for FOSGISS in Berlin next
week. Last topic is a join-example and I cannot get it to work :(

this is my join in the layer:
>   JOIN
>     NAME "test"
>     CONNECTIONTYPE CSV
>     TABLE "./shapes_join/join.csv"
>     FROM "osm_id"
>     TO "1"
> #    TO "0"
> #    TO "tab_1"
> #    TO "osm_id"
>     TYPE ONE-TO-ONE
>   END

the first lines of the csv:
> osm_id;name_join
> 21484050;Karlshorst
> 21484076;Schmöckwitz
> 21484102;Adlershof
> 27380127;Bohnsdorf
> 28094136;Schöneberg

and here is the featureonfo-output:
GetFeatureInfo results:

Layer 'places'
  Feature 137:
    osm_id = '560483810'
    name = 'Neu-Hohenschönhausen'
    type = 'suburb'
    population = '''

no 'name_join' :(

tried upper und lower cases for column-names

funny: the only output in errorlog (level5) is:
> [Thu Mar 13 10:48:52 2014].209278 msSearchDiskTree(): Search returned no results. Unable to open spatial index for /home/user/data/mapserverIIWS/./shapes_join/places_join.qix. In most cases you can safely ignore this message, otherwise check file names and permissions.
> [Thu Mar 13 10:48:52 2014].209678 freeLayer(): freeing layer at 0x9451cd8.
'Search returned no results.' but there are results....


$ ogrinfo join.csv lookup -summary
 INFO: Open of `join.csv'
       using driver `CSV' successful.
 FAILURE: Couldn't fetch requested layer lookup!

This is my only hint but unfortunatly I don't know what ogr wants to
tell me.

regards, Jörg


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


_________________________________________________

MapMedia
Kartographie und raumbezogene Informationssysteme

Gillweg 3, 14193 Berlin
fon: +49 30 89 06 82-70
fax: +49 30 89 09 53-21
mail: jt at mapmedia.de
net:  www.mapmedia.de
_________________________________________________


Geschäftsführer: G. v. Tschirnhaus, J. Thomsen, P. Stamm
Registergericht, Berlin - Amtsgericht Charlottenburg,
HRB 89625, Umsatzsteuer-Identnummer: DE 813794062



More information about the MapServer-users mailing list