Talk:JOSM/Plugins/OpenData

From OpenStreetMap Wiki
Jump to navigation Jump to search

Modules

What is the role of modules? Does one need a module for ones area to use the plugin? A short intro would be very useful. --Dittaeva 22:57, 8 March 2012 (UTC)

The idea behind a module is to provide everything that is area-specific. The main example is to provide a conversion schema between the "tags" used by a data provider and the well known OSM tags. I'll write something about it on the main page :) --Don-vip 14:26, 9 March 2012 (UTC)

CSV

i try to open csv-files with OpenData but there comes the message that not coordinates will be found. is a special header-definition or value order be require ? --Lübeck 20:12, 8 March 2012 (UTC)

The plugin tries to discover the projection used in CSV files by matching column names with pre-defined patterns. it looks like your CSV file use none of the patterns I thinked about. Can you give me a link to your file ? --Don-vip 14:27, 9 March 2012 (UTC)
Wouldn't it be simpler to tell us a pattern that will work? It's very easy for us to rename columns. Even if the intelligence is there to guess the format, knowing one working format makes life easier. Bazzargh (talk) 08:28, 27 May 2013 (UTC)

I also have the same problem. I have tried several different things. Even created a file with only one point lat<tab>long. But same problem. These are the first few lines in the file I want to import: 58.891462 11.007767 Långegärde, Strömstad 9021014026420000 477 58.89308 11.009997 Västra bryggan, Strömstad 9021014026421000 66 58.903184 11.020739 Vettnet, Strömstad 9021014026422000 66 58.89361 11.048821 Ekenäs, Strömstad 9021014026410000 66

I can arrange the collumns as you like and also change . to , or have ; instead of <tab>? Just if you could say how it should look? Coordinats are in WGS84. I would like it to create nodes with tags like k=1 t=Långegärde, Strömstad k=2 t=9021014026420000 k=3 t=477 Or if I create a header line? Just say how you need it to look and I think I can make it.. --Thod 00:38, 11 November 2012 (UTC)

Hmm looks stange in viewing mode but if you edit it looks correct..--Thod 00:40, 11 November 2012 (UTC)
A CSV like this seems to work:
latitude;longitude;amenity;name
43.0;12.0;"restaurant";"The Mapper"
--Groppo 10:33, 5 January 2013 (UTC)

Irish Grid

Can you add the Bursa Wolf parameters for Irish Grid?

For EPSG 29902/TM65_Irish_Grid the params are:

Translation X 482.50 Translation Y -130.60 Translation Z 564.60 Rotation X -1.042 Rotation Y -0.214 Rotation Z -0.631 Scale Factor 8.15

Woups, sorry for the delay. Of course, I'll look into it. --Don-vip 11:01, 6 September 2012 (BST)
It should be available now, as the entire EPSG database is now bundled in the geotools plugin. --Don-vip 22:40, 1 December 2012 (UTC)

Install under Windows

I've installed the plugin on a number of Windows machines and found the File->Open menu is unchanged and doesn't allow the loading of *.SHP for example. Works ok on Ubuntu. Alex Sims 13:32, 5 September 2012 (BST)

Strange, I'll look into it. Are your running the current tested version of JOSM (5485) ? --Don-vip 11:02, 6 September 2012 (BST)
I've upgraded to 5485 from the previous stable version (5356) and now the menu item is there. However I now get an exception from the plugin after downloading data from OSM. I'll follow this up separately. Alex Sims 05:52, 15 September 2012 (BST)

KML

I use the iPhone-App "Galileo Offline Maps" to record GPS-tracks and hotspots to include in OSM. Best way to transfer the info are KML-files. So I tried to use OpenData-Plugin to import the KML-file created by Galileo. It does not work. Here is the error: "The file 'BusLines.kml' could not be read. Error message: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,73] Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?gx&gx:Track"

Please find the KML-import file here.

Nounours77, 17:20, 25 octobre 2012

P.S.: a workaround that seems to work for me: convert the KML file to gpx using GPSBabel ... Nounours77, 03:10, 26 octobre 2012

Bug fixed in version 29020. Please note you need first to fix your KML file to comply with the gx prefix declaration as illustrated here: https://developers.google.com/kml/documentation/kmlreference#kmlextensions (append xmlns:gx="http://www.google.com/kml/ext/2.2" to your kml tag) --Don-vip 22:39, 1 December 2012 (UTC)

Opening a shapefile throws Java exception

Just received a shapefile (well, the .shp, .shp.xml, .sbx, .sbn, .prj, .dbf components) from a colleague, and have installed the OpenData plugin to open it/them.

When I do so (from JOSM 5531, OpenData plugin 22807, jts 28415, and utilsplugin 28807), Java throws this exception:

org.openstreetmap.josm.io.IllegalDataException: java.io.IOException: java.lang.NoClassDefFoundError: java/nio/channels/SeekableByteChannel at org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpImporter.parseDataSet(ShpImporter.java:38) at org.openstreetmap.josm.io.OsmImporter.loadLayer(OsmImporter.java:90) at org.openstreetmap.josm.io.OsmImporter.importData(OsmImporter.java:71)

It continues, I'll stop there.

I'm a bit befuddled -- it just halts right out of the starting gate. stevea, 22:18, 1 November 2012 (UTC)

Update: As a workaround, I decided to try Merkaartor to read the shapefile and write as .osm. That worked perfectly on the exact same data, so I used JOSM (my preferred editor) to clean up the tags. I'm still curious why the OpenData plugin throws Java exceptions when trying to open this local shapefile.


Java problem for me too when I try to open a Shape file :

java.io.IOException: java.lang.NoSuchMethodError: org.geotools.data.DataStore.getFeatureSource(Ljava/lang/String;)Lorg/geotools/data/simple/SimpleFeatureSource;

When I try to open a KMZ file :

javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog.

When I try to open a CSV file :

No valid coordinates have been found.

Unable to use OpenData plugin... --Ptigrouick 16:52, 22 November 2012 (UTC)

Hi. I have made a huge change to the plugin to rely on latest GeoTools library. Can you see if your errors still happen with version 29017 ? Thanks. --Don-vip 22:03, 1 December 2012 (UTC)

Source ?

Please where is the source of this plugin ? I can't find it on wiki or other page. Thanks. Lomilac 10:01, 1 December 2012 (UTC)

It's located with other JOSM plugins: https://trac.openstreetmap.org/browser/subversion/applications/editors/josm/plugins/opendata --Don-vip 21:59, 1 December 2012 (UTC)

That link now points to an archived repository. There's https://github.com/JOSM/josm-plugins, but that claims to be a mirror of an other archived repository... --Olejorgenb (talk) 09:53, 19 August 2023 (UTC)

Java array error with KMZ import

Hi,

firstly, the spec fandango, SuSE Linux 12.1 + JOSM 5608 + OpenData 29107. During an attempted import via standard JOSM File/Open I get a java error dialog containing the following:

Could not read file 'vmlite_towns.kmz'. Error is: java.lang.NegativeArraySizeException

I have tried several files, all from the same source (http://data.gov.au/data/?category=Geography). This is an Australian government website for public release of various departmental data categories. I don't do java (lots of c, c++, php.....oh whatever) but it looks like it is perhaps an issue specific to these files. As it is from a public source I gather I won't be the only one who encounters this little annoyance. Any ideas, suggestions or comments...?

--Regards --- Michael.j.Falconer. (talk) 00:43, 10 February 2013 (UTC)


OOOOPs!!!!

Sorry, new to this gis caper and caught by what appears to be a 'rookie error'! KMZ turns out to be compressed KML. Simply using 'File Roller' or 'Ark' or other archive utility to decompress and then attempt to load resulting KML via OpenData worked fine. At least someone else might save themselves an embarrassment if they see this.

--Regards --- Michael.j.Falconer. (talk) 03:30, 10 February 2013 (UTC)

Encoding

How about adding an ability to select the encoding when opening a shapefile? --Sergey Astakhov (talk) 14:05, 21 February 2013 (UTC)

Required JOSM Version

When I installed this plugin and restarted JOSM I was told that: "Plugin opendata requires JOSM version 6162. The current JOSM version is 6115. You have to update JOSM in order to use this plugin" My problem is that 6115 is the latest release. Surely I shouldn't need to run the development version to use this plugin? InsertUser (talk)

How did you install the plugin ? --Don-vip (talk) 23:44, 1 September 2013 (UTC)
From within the Plugins tab of the preferences window like it says on the main page. InsertUser (talk) 22:06, 2 September 2013 (UTC)
Strange, you should not have received this version of the plugin if you have always used 6115. Anyway, the new tested version of JOSM will be released this week-end. --Don-vip (talk) 00:00, 4 September 2013 (UTC)

wfs and geoserver

What's the best way to open a wfs layer using this plugin? I'm running geoserver (www.geoserver.org), how should I load, say,

http://demo.opengeo.org/geoserver/osm/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=osm%3Aplacenames_capital&maxfeatures=50&outputformat=application%2Fvnd.google-earth.kml%2Bxml

or

http://demo.opengeo.org/geoserver/osm/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=osm%3Aadmin_other&maxfeatures=50&outputformat=GML2

from here

http://demo.opengeo.org/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.web.demo.OpenGeoMapPreviewPage

?

If I try 'file', 'open location', it says the file extension is unsupported.

Is there a simple way to create a plugin to load such things?

See feature request #16880 Add support for WFS layer for JOSM (core)
--Pyrog (talk) 07:37, 18 February 2022 (UTC)

data.gv.at

Maybe the austrian open data portal could be added: https://www.data.gv.at/. Also the city of Linz offers some data on it's own portal: http://data.linz.gv.at/daten/

I tried out a couple of gml data entries, but had no luck displaying them in JOSM. For example: https://www.data.gv.at/katalog/dataset/ogdlinz_statistische-bezirke-linz-ab-2014-01-01/resource/8c448090-4b72-4803-831f-6ba840989edc or the gml files under http://ckan.data.linz.gv.at/package/3d-geodaten-mit-level-of-detail2

Flaimo (talk) 07:32, 19 May 2015 (UTC)

Unable to open MapInfo .tab file

I have received both 'No coordinates found' and 'No data found in file' messages in JOSM when trying to open a small .tab file that is in WGS84 projection. I added Longitude and Latitude columns and filled them in case they were required and swapped their order, even, in case this mattered. Here are the .tab file details: !table !version 800 !charset WindowsLatin1 Definition Table

 Type NATIVE Charset "WindowsLatin1"
 Fields 12
   Name Char (60) Index 1 ;
   RouteCode Char (10) Index 2 ;
   ParishCode Char (5) ;
   RouteNumber Integer ;
   Status Char (5) ;
   StatusDescription Char (50) Index 3 ;
   PROWAbbr Char (2) ;
   OSMIdentifier Char (60) ;
   CSIdentifier Char (5) ;
   Prow_ref Char (23) ;
   Latitude Float ;
   Longitude Float ;

I saved the table as a workspace also, to confirm its projection as:

 CoordSys Earth Projection 1, 104

Neptune files

When I try to open a Neptune file with Josm, with the plug-in installed, I receive a message saying that no data have been found in the file. So, I cannot use the date. I've tried with some file from some sources, whatever the one I try, I receive the same message.

Virgile1994 (talk) 10:34, 25 February 2016 (UTC)

How to start using the plugin is missing from documentation

The page currently says:

To get the last version, you need at least to have JOSM 5132 installed. Open JOSM and select from menu Edit > Preferences, then there Plugins > Download list. Check opendata in the list. Now restart JOSM. Note that loading in large files consumes memory and you may wish to restart JOSM with more memory than you have previously. If you find JOSM pauses and is slow when importing a file, this may be due to a memory shortage rather than the plugin itself.

I think that it is missing something. It should be:

To get the last version, you need at least to have JOSM 5132 installed. Open JOSM and select from menu Edit > Preferences, then there Plugins > Download list. Check opendata in the list. Now restart JOSM.

To [open/activate/use] the plugin [do something]

Note that loading in large files consumes memory and you may wish to restart JOSM with more memory than you have previously. If you find JOSM pauses and is slow when importing a file, this may be due to a memory shortage rather than the plugin itself.

What should the missing line say? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 15:00, 22 January 2021 (UTC)