[OSM-dev] Area calculation without transformation
Jochen Topf
jochen at remote.org
Fri Apr 19 09:41:19 UTC 2024
Hi!
I am bit late to the party... In osm2pgsql I am using boost::geometry
for these kinds of things. I found that to be much faster than GEOS/OGR.
https://github.com/osm2pgsql-dev/osm2pgsql/blob/master/src/geom-functions.cpp#L367-L379
Jochen
On Sun, Mar 24, 2024 at 03:44:24PM +0100, Florian Lohoff wrote:
> Date: Sun, 24 Mar 2024 15:44:24 +0100
> From: Florian Lohoff <f at zz.de>
> To: dev at openstreetmap.org
> Subject: [OSM-dev] Area calculation without transformation
>
>
> Hi,
>
> I am looking into performance issued with QA code of mine and i am at one
> point i calculate the osm objects area.
>
> I am using libosmium and gdal/OGR right now.
>
> Now - to get a m² based area i am transforming into an planar EPSG
> which seems to be the bottleneck of processing.
>
> I now had a quick look at postgis'es lwgeom code for ST_Area using
> a spheroid which my guess is much faster as i am on the very same spheroid
> all the time.
>
> Does anyone know of a c++ implementation nicely plugging into
> libosmium/gdal/ogr processing just using the EPSG:4326?
>
> Flo
> --
> Florian Lohoff f at zz.de
> Any sufficiently advanced technology is indistinguishable from magic.
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
--
Jochen Topf jochen at remote.org https://www.jochentopf.com/ +49-351-31778688
More information about the dev
mailing list