1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

- Update to r26711

This commit is contained in:
Dmitry Marakasov 2011-09-26 03:11:31 +00:00
parent 61945a4c09
commit 58bde6c87f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282405
3 changed files with 3 additions and 90 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= osm2pgsql
PORTVERSION= r26200
PORTREVISION= 1
PORTVERSION= r26711
CATEGORIES= converters geography
MASTER_SITES= http://mirror.amdmi3.ru/distfiles/

View File

@ -1,2 +1,2 @@
SHA256 (osm2pgsql-r26200.tar.bz2) = dfbd9d710c0d4f317b53132a22bf92a7f93234b934e16b8bdd9eaf800d8c27e4
SIZE (osm2pgsql-r26200.tar.bz2) = 25561601
SHA256 (osm2pgsql-r26711.tar.bz2) = 048fb988dfb84aed8f8b0115cfc8969217aad3ab3889e84dfb3b586e19ce7338
SIZE (osm2pgsql-r26711.tar.bz2) = 25580541

View File

@ -1,86 +0,0 @@
// The patch makes it build with new geos-3.3.0
// create(suze_t, size_t) is pretty straightforward, but
// these dynamic_casts I really don't like
--- build_geometry.cpp.orig 2011-01-16 20:01:16.000000000 +0300
+++ build_geometry.cpp 2011-06-30 02:51:28.000000000 +0400
@@ -71,7 +71,7 @@
char *get_wkt_simple(osmNode *nodes, int count, int polygon) {
GeometryFactory gf;
- std::auto_ptr<CoordinateSequence> coords(gf.getCoordinateSequenceFactory()->create(0, 2));
+ std::auto_ptr<CoordinateSequence> coords(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
try
{
@@ -113,7 +113,7 @@
size_t get_wkt_split(osmNode *nodes, int count, int polygon, double split_at) {
GeometryFactory gf;
- std::auto_ptr<CoordinateSequence> coords(gf.getCoordinateSequenceFactory()->create(0, 2));
+ std::auto_ptr<CoordinateSequence> coords(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
double area;
WKTWriter wktw;
size_t wkt_size = 0;
@@ -143,7 +143,7 @@
double distance = 0;
std::auto_ptr<CoordinateSequence> segment;
- segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create(0, 2));
+ segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
segment->add(coords->getAt(0));
for(unsigned i=1; i<coords->getSize(); i++) {
segment->add(coords->getAt(i));
@@ -155,7 +155,7 @@
areas.push_back(0);
wkt_size++;
distance=0;
- segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create(0, 2));
+ segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
segment->add(coords->getAt(i));
}
}
@@ -253,7 +253,7 @@
case GEOS_MULTIPOINT:
// Drop through
case GEOS_MULTILINESTRING:
- gc = (GeometryCollection *) geometry;
+ gc = dynamic_cast<GeometryCollection *>(geometry);
num_geometries = gc->getNumGeometries();
*xnodes = (struct osmNode **) malloc((num_geometries + 1) * sizeof(struct osmNode *));
*xcount = (int *) malloc(num_geometries * sizeof(int));
@@ -309,7 +309,7 @@
try
{
for (int c=0; xnodes[c]; c++) {
- std::auto_ptr<CoordinateSequence> coords(gf.getCoordinateSequenceFactory()->create(0, 2));
+ std::auto_ptr<CoordinateSequence> coords(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
for (int i = 0; i < xcount[c]; i++) {
struct osmNode *nodes = xnodes[c];
Coordinate c;
@@ -358,7 +358,7 @@
//std::cerr << "polygon(" << osm_id << ") is no good: points(" << pline->getNumPoints() << "), closed(" << pline->isClosed() << "). " << writer.write(pline.get()) << std::endl;
double distance = 0;
std::auto_ptr<CoordinateSequence> segment;
- segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create(0, 2));
+ segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
segment->add(pline->getCoordinateN(0));
for(unsigned i=1; i<pline->getNumPoints(); i++) {
segment->add(pline->getCoordinateN(i));
@@ -370,7 +370,7 @@
areas.push_back(0);
wkt_size++;
distance=0;
- segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create(0, 2));
+ segment = std::auto_ptr<CoordinateSequence>(gf.getCoordinateSequenceFactory()->create((size_t)0, (size_t)2));
segment->add(pline->getCoordinateN(i));
}
}
@@ -484,7 +484,7 @@
{
for(unsigned i=0; i<toplevelpolygons; i++)
{
- Polygon* poly = (Polygon*)polygons->at(i);
+ Polygon* poly = dynamic_cast<Polygon*>(polygons->at(i));
std::string text = writer.write(poly);
wkts.push_back(text);
areas.push_back(poly->getArea());