Hi,
Anyone who knows how I can retrieve the bounding box of a given country in this dataset (MultiPolygon)?
Bjørn
The current 1.0 version does not have that as an attribute. The 1.1 version to be released soon does. In the meantime, here’s how to calculate that using ArcMap Field Calculator VBA prelogic:
dim Output as double
dim pGeom as IGeometry
set pGeom = [shape]
Output = pGeom.Envelope.XMin
Then put Output in the 2nd text field in the field calculator dialog and complete dialog.
In a shape file, e.g. in 50m-admin-0-countries.shp, the entries are sorted in exactly the s
$ shapelib-1.3.0b1/dbfdump 50m-cultural/50m-admin-0-countries.shp | cut -c1-20 | head -n 4
COUNTRY
Afghanistan
Albania
Algeria
shapelib-1.3.0b1/shpdump 50m-cultural/50m-admin-0-countries.shp | grep -A1 “Bounds:” | head
File Bounds: ( -180.000, -89.999,0,0)
to ( 180.000, 83.600,0,0)
—
Bounds:( 60.486, 29.392, 0)
to ( 74.891, 38.456, 0)
—
Bounds:( 19.281, 39.653, 0)
to ( 21.031, 42.648, 0)
—
Bounds:( -8.683, 18.987, 0)
to ( 11.968, 37.092, 0)
Ah, it sucks that you don’t have a “preview” and that there is no “edit” capability. The first paragraph should be:
In a shape file, e.g. in 50m-admin-0-countries.shp, the entries are sorted
in exactly the same order as in the accomanying database. Therefore you can
use low-level tools, e.g. from shapelib, to dump both files and correlate
the data:
@holgerschurig: Sorry about that. bbPress is from the same folks as WordPress but not quite as industrial strength. I’ve added a new plugin for the previews, hope it works.
Oops, still not working. Let me tinker.