Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.SimplePrimitiveId


                        try {
                            long id = Long.parseLong(s);
                            if (id <= 0) {
                                return false;
                            } else if (type == OsmPrimitiveType.NODE) {
                                ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.NODE));
                            } else if (type == OsmPrimitiveType.WAY || type == OsmPrimitiveType.CLOSEDWAY) {
                                ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.WAY));
                            } else if (type == OsmPrimitiveType.RELATION || type == OsmPrimitiveType.MULTIPOLYGON) {
                                ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.RELATION));
                            } else {
                                return false;
                            }
                        } catch (IllegalArgumentException ex2) {
                            return false;
View Full Code Here


                    progressMonitor.setCustomText(msg);
                    result.dataSet.mergeFrom(singleGetId(type, id, progressMonitor));
                } catch (OsmApiException e) {
                    if (e.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
                        Main.info(tr("Server replied with response code 404 for id {0}. Skipping.", Long.toString(id)));
                        result.missingPrimitives.add(new SimplePrimitiveId(id, type));
                    } else {
                        throw e;
                    }
                }
            }
View Full Code Here

                    // the root element, ignore
                    break;
                case "node":
                case "way":
                case "relation":
                    PrimitiveId id  = new SimplePrimitiveId(
                            Long.parseLong(atts.getValue("old_id")),
                            OsmPrimitiveType.fromApiTypeName(qName)
                    );
                    DiffResultEntry entry = new DiffResultEntry();
                    if (atts.getValue("new_id") != null) {
View Full Code Here

            ds = reader.parseHistory(NullProgressMonitor.INSTANCE);
        } catch(OsmTransferException e) {
            Main.error(e);
            return;
        }
        History h = ds.getHistory(new SimplePrimitiveId(id, type));
        browser.populate(h);
    }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.SimplePrimitiveId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.