+ add office=*


git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28788 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Change the default node ram cache allocation strategy on 32bit platforms to sparse

Chunked and optimized both cause problems on platforms with limited virtual memory (i.e. 32bit platforms),
so change the default to sparse, which doesn't have as much virtual memory overhead for accounting and indexing.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28789 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Move code back to using ANSI C standard

In an attempt to get osm2pgsql compiled for windows, move
back to using ANSI C standard, as msvc doesn't support C99.

Also clean up some compiler warnings.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28862 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Fix bug #4651 - Failed fall back for when fork doesn't succeed

In multi-process mode, if the fork did not succeed "Iterate over pending ways"
and "Iterate over pending relations" produced the wrong data, as the fall back
mechanism didn't correctly work.

The information of the reduced number of successful helper processes was only
conveyed to the first process, and therefore all other helper processes used
the wrong stride length to go through the pending ways/relations array. Therefore
many ways/relations were not correctly processed.

Using a mmaped structure, make sure all helper processes know how many processes
correctly started for processing.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28864 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Fix Bug #3607 - Function index is not available in MinGW

The function index() is deprecated in the posix standard and superseded
by the strchr function. As index is not available in MinGW, replace
it with strchr to make osm2pgsql compile.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28865 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Fix bug 4625 - bbox parameter not working with pbf files



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28868 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Add o5m support to osm2pgsql

This is a patch provided by http://wiki.openstreetmap.org/wiki/Osm2pgsql/o5m
and improved by Darafei Praliaskouski




git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28876 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] zero buffering invalid geometries

This is a set of commits by Darafei Praliaskouski with some own changes

Unless the --exclude-invalid-polygon flag is given, all invalid geometries
are fixed using the buffer(0) method



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28877 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql]  -x doesn't clutter hstore database too much anymore

This is a patch by Darafei Praliaskouski




git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28878 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] - -x support for pbf - fixed names of attributes

This is a patch by Darafei Praliaskouski




git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28879 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] faster relation processing due to early discard of non-supported ones

This is a patch by Darafei Praliaskouski




git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28880 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
fix compile of middle-pgsql if HAVE_MMAP is not defined

git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28907 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
comparison between pointer and zero is not portable + avoids pedantic warning with clang++

git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28908 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
+public_transport


git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28948 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Try and enable large file support on more systems

A number of files used in osm2pgsql can be bigger than 4Gb so we need
large file support such that off_t is 64bit. Try and use a more portable
version to enable large file support through compiler preprocessor directives




git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28956 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] More cleanup work to support compiler flags -ansi -pedantic


git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28957 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
lseek uses 64 bit offsets on os x

git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28958 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
follow to r28957 - handle -Wdeclaration-after-statement warnings as ISO C90 forbids mixing declarations and code - another step toward supporting -ansi -pedantic

git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28959 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
revert unintended changes from r28959

git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28960 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Configure check for fork and only provice --number-processes if available

Windows doesn't have fork, so when compiling with MinGW ifdef those sections



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@29052 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4