[osm2pgsql] 02/07: Imported Upstream version 0.90.0+ds

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Wed Mar 2 17:56:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository osm2pgsql.

commit 22a2d1e03201afc78532d8efe8122a80847c9002
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Wed Mar 2 18:43:38 2016 +0100

    Imported Upstream version 0.90.0+ds
---
 CMakeLists.txt                   |   7 +-
 cygpkg.sh                        |  59 -----------------
 docs/nodecachefilereader.1       |  37 -----------
 node-persistent-cache-reader.cpp | 140 ---------------------------------------
 4 files changed, 1 insertion(+), 242 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d38df30..3aa5ec2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 set(PACKAGE osm2pgsql)
 set(PACKAGE_NAME osm2pgsql)
-set(PACKAGE_VERSION 0.90.0-RC1)
+set(PACKAGE_VERSION 0.90.0)
 
 cmake_minimum_required(VERSION 2.8.7)
 
@@ -238,11 +238,6 @@ add_executable(osm2pgsql osm2pgsql.cpp)
 target_link_libraries(osm2pgsql_lib ${LIBS})
 target_link_libraries(osm2pgsql osm2pgsql_lib ${LIBS})
 
-if (HAVE_SYS_TIME_H) # until node-persistent-cache-reader is translated to std::chrono
-  add_executable(node-persistent-cache-reader node-persistent-cache-reader.cpp)
-  target_link_libraries(node-persistent-cache-reader osm2pgsql_lib ${LIBS})
-endif()
-
 #############################################################
 # Build tests
 #############################################################
diff --git a/cygpkg.sh b/cygpkg.sh
deleted file mode 100644
index e1a37a3..0000000
--- a/cygpkg.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/bash
-#
-#  Author:       Jason Huntley
-#  Email:        onepremise at gmail.com
-#  Description:  Cygwin Package script
-#
-#  Change Log
-#
-#  Date                   Description                 Initials
-#-------------------------------------------------------------
-#  04-11-13             Initial Coding                  JAH
-#=============================================================
-
-if [ ! -e "cygwin-package" ]; then
-  mkdir cygwin-package
-fi
-
-echo
-echo Copying Executable...
-echo
-
-cp -rfv default.style cygwin-package || { stat=$?; echo "Packaging failed, aborting" >&2; exit $stat; }
-cp -rfv 900913.sql cygwin-package || { stat=$?; echo "Packaging failed, aborting" >&2; exit $stat; }
-cp -rfv README cygwin-package || { stat=$?; echo "Packaging failed, aborting" >&2; exit $stat; }
-cp -rfv .libs/osm2pgsql.exe cygwin-package || { stat=$?; echo "Packaging failed, aborting" >&2; exit $stat; }
-
-echo
-echo Copying Dependent Libraries...
-echo
-
-cp -rfv /bin/cygcrypt*.dll cygwin-package
-cp -rfv /bin/cyggcc*.dll cygwin-package
-cp -rfv /usr/local/bin/cyggeos*.dll cygwin-package
-cp -rfv /bin/cygiconv*.dll cygwin-package
-cp -rfv /bin/cygintl*.dll cygwin-package
-cp -rfv /bin/cyglber*.dll cygwin-package
-cp -rfv /bin/cygldap*.dll cygwin-package
-cp -rfv /bin/cyglzma*.dll cygwin-package
-cp -rfv /bin/cygpq*.dll cygwin-package
-cp -rfv /usr/local/bin/cygproj*.dll cygwin-package
-cp -rfv /usr/local/bin/cygproto*.dll cygwin-package
-cp -rfv /bin/cygsasl*.dll cygwin-package
-cp -rfv /bin/cygssl*.dll cygwin-package
-cp -rfv /bin/cygstdc++**.dll cygwin-package
-cp -rfv /bin/cygwin*.dll cygwin-package
-cp -rfv /bin/cygxml2*.dll cygwin-package
-cp -rfv /bin/cygz*.dll cygwin-package
-
-echo
-echo Creating Archive...
-echo
-
-zip -r9 cygwin-package.zip cygwin-package
-
-echo
-echo Packaging Complete.
-echo
-
-exit 0
diff --git a/docs/nodecachefilereader.1 b/docs/nodecachefilereader.1
deleted file mode 100644
index 1d28c64..0000000
--- a/docs/nodecachefilereader.1
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH NODECACHEFILEREADER 1 "April 06, 2013"
-.\" Please adjust this date whenever revising the manpage.
-.SH NAME
-nodecachefilereader \- utility to inspect osm2pgsql's node cache.
-.SH SYNOPSIS
-.B nodecachefilereader
-.RI /path/to/node.cache
-.br
-.B nodecachefilereader
-.RI /path/to/node.cache\ node_id1\ node_id2\ node_id3
-.br
-.B nodecachefilereader
-.RI /path/to/node.cache\ node_id1,node_id2,node_id3
-.br
-.SH DESCRIPTION
-This manual page documents briefly the
-.B nodecachefilereader
-command.
-.PP
-.B nodecachefilereader
-allows you to inspect and test osm2pgsql's custom node database.
-.PP
-.SH OPTIONS
-If only the filename of the node cache is given, nodecachefilereader
-performs some basic diagnostics on the node cache, as well as give
-some basic benchmark results on how quickly it can lookup nodes by id
-.PP
-If one or more node_ids are given, nodecachefilereader retrieves the
-information stored (latitude / longitude) about those nodes in the database
-.PP
-.SH SEE ALSO
-.BR osm2pgsql (1),
-.br
-.SH AUTHOR
-nodecachefilereader was written by Kai Krueger and other
-OpenStreetMap project members.
-.PP
diff --git a/node-persistent-cache-reader.cpp b/node-persistent-cache-reader.cpp
deleted file mode 100644
index 7504ab1..0000000
--- a/node-persistent-cache-reader.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-#include <cstdio>
-#include <cstdlib>
-#include <unistd.h>
-#include <cstring>
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <memory>
-
-#include "osmtypes.hpp"
-#include "options.hpp"
-#include "node-persistent-cache.hpp"
-#include "node-ram-cache.hpp"
-
-void test_get_node_list(std::shared_ptr<node_persistent_cache> cache,
-                        int itterations, int max_size, int process_number) {
-    int i, j, node_cnt, node_cnt_total;
-    nodelist_t nodes;
-    struct timeval start, stop;
-    struct timeval start_overall, stop_overall;
-    idlist_t osmids;
-
-    node_cnt_total = 0;
-    gettimeofday(&start_overall, nullptr);
-    for (i = 0; i < itterations; i++) {
-        node_cnt = random() % max_size;
-        node_cnt_total += node_cnt;
-
-        printf("Process %i: Getting %i nodes....\n", process_number, node_cnt);
-        for (j = 0; j < node_cnt; j++) {
-            osmids.push_back(random() % (1 << 31));
-        }
-        gettimeofday(&start, nullptr);
-        cache->get_list(nodes,osmids);
-        gettimeofday(&stop, nullptr);
-        double duration = ((stop.tv_sec - start.tv_sec)*1000000.0 + (stop.tv_usec - start.tv_usec))/1000000.0;
-        printf("Process %i: Got nodes in %f at a rate of %f/s\n", process_number, duration, node_cnt / duration);
-        nodes.clear();
-        osmids.clear();
-    }
-    gettimeofday(&stop_overall, nullptr);
-    double duration = ((stop_overall.tv_sec - start_overall.tv_sec)*1000000.0 + (stop_overall.tv_usec - start_overall.tv_usec))/1000000.0;
-    printf("Process %i: Got a total of nodes in %f at a rate of %f/s\n", process_number, duration, node_cnt_total / duration);
-}
-
-int main(int argc, char *argv[]) {
-    int i,p;
-    options_t options;
-    osmNode node;
-    nodelist_t nodes;
-    struct timeval start;
-    idlist_t osmids;
-    int node_cnt;
-    options.append = true;
-    options.flat_node_cache_enabled = true;
-    options.flat_node_file = argv[1];
-    auto ram_cache = std::make_shared<node_ram_cache>(0, 10, options.scale);
-    std::shared_ptr<node_persistent_cache> cache;
-
-
-	if (argc > 3) {
-		cache.reset(new node_persistent_cache(&options, 1, true, ram_cache));
-		node_cnt = argc - 2;
-		for (i = 0; i < node_cnt; i++) {
-			osmids.push_back(strtoosmid(argv[2 + i], nullptr, 10));
-		}
-		cache->get_list(nodes, osmids);
-		for (i = 0; i < node_cnt; i++) {
-			printf("lat: %f / lon: %f\n", nodes[i].lat, nodes[i].lon);
-		}
-	} else if (argc == 2) {
-            char * state = (char *)malloc(sizeof(char)* 128);
-        gettimeofday(&start, nullptr);
-        initstate(start.tv_usec, state, 8);
-        setstate(state);
-
-	    printf("Testing mode\n");
-	    cache.reset(new node_persistent_cache(&options, 1, true, ram_cache));
-	    test_get_node_list(cache, 10, 200, 0);
-	    cache.reset();
-#ifdef HAVE_FORK
-	    printf("Testing using multiple processes\n");
-	    int noProcs = 4;
-	    int pid;
-	    for (p = 1; p < noProcs; p++) {
-	        pid=fork();
-	        if (pid==0) {
-	            break;
-	        }
-	        if (pid==-1) {
-	            fprintf(stderr,"WARNING: Failed to fork helper processes. Falling back to only using %i \n", p);
-	            exit(1);
-	        }
-	    }
-	    gettimeofday(&start, nullptr);
-	    initstate(start.tv_usec, state, 8);
-	    setstate(state);
-	    cache.reset(new node_persistent_cache(&options, 1, true, ram_cache));
-	    test_get_node_list(cache, 10,200,p);
-
-	    if (pid == 0) {
-	        cache.reset();
-	        fprintf(stderr,"Exiting process %i\n", p);
-	        exit(0);
-	    } else {
-	        for (p = 0; p < noProcs; p++) wait(nullptr);
-	    }
-        free(state);
-	    fprintf(stderr, "\nAll child processes exited\n");
-#endif
-	} else {
-		cache.reset(new node_persistent_cache(&options, 1, true, ram_cache));
-		if (strstr(argv[2],",") == nullptr) {
-			cache->get(&node, strtoosmid(argv[2], nullptr, 10));
-			printf("lat: %f / lon: %f\n", node.lat, node.lon);
-		} else {
-                    char * node_list = (char *)malloc(sizeof(char) * (strlen(argv[2]) + 1));
-			strcpy(node_list,argv[2]);
-			node_cnt = 1;
-			strtok(node_list,",");
-			while (strtok(nullptr,",") != nullptr) node_cnt++;
-			printf("Processing %i nodes\n", node_cnt);
-			strcpy(node_list,argv[2]);
-			osmids.push_back(strtoosmid(strtok(node_list,","), nullptr, 10));
-			for (i = 1; i < node_cnt; i++) {
-				char * tmp = strtok(nullptr,",");
-				osmids.push_back(strtoosmid(tmp, nullptr, 10));
-			}
-			cache->get_list(nodes,osmids);
-			for (i = 0; i < node_cnt; i++) {
-				printf("lat: %f / lon: %f\n", nodes[i].lat, nodes[i].lon);
-			}
-		}
-	}
-
-
-    cache.reset();
-    ram_cache.reset();
-
-    return 0;
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osm2pgsql.git



More information about the Pkg-grass-devel mailing list