[GRASS-user] Importing USGS' wrs2_descending Shapefile
Nikos Alexandris
nik at nikosalexandris.net
Sun Jan 18 06:10:08 PST 2015
Nikos Alexandris:
> >>>> I can't get wrs2_descending.shp file (from
> >>>> <http://landsat.usgs.gov/documents/wrs2_descending.zip>) to import
> >>>> sans errors (grass7). No matter the snap threshold. Anyone recently
> >>>> imported it?
Markus Neteler wrote:
> >> I think that their overlapping areas cannot be represented as pure
> >> topological model.
> > Right.
Markus Metz:
> Yes, overlapping areas can be represented as a topological model
> through M:N mapping: each area can belong to several categories,
> several areas can have the same category. If you want to get the
> coverage for a particular Landsat scene, just select the path and row
> with where="PATH = x and row = y". See also the manual of v.buffer for
> a similar example.
That is fine for a simple case. I want to build an easy way
of trimming many Landsat scenes, after they are imported in GRASS' db, each scene in
its own Mapset (using this currently:
<https://github.com/NikosAlexandris/i.landsat.import>).
If a scene is "there", then we have it's center coordinates
(specifically, the useful info, at this point, will be the output of
`g.region -gcl |grep center_l`).
Using, then, something like <ttps://github.com/robintw/LatLongToWRS>, we
get the ID of the tile in question. The ID, represented by the
combination of Path and Row, is a safe option.
Having the ID will help to select the tile of interest, create a MASK
and trim. All a user needs to feed to the module,
would be the name of names of Mapset(s) of interest. Basta.
Landsat users, wouldn't need to re-import manually for each and every
case the tiles from the official Shapefile.
> >> Hence, you need to maintain them (AFAIK it is the -c option in v.in.ogr).
> >> Please correct me if I am wrong.
> For this shapefile, original polygons can not be maintained (incorrect
> boundaries, centroids exceeding number of areas).
But there must be a solution to this. Forget/erase all centroids. Let
the script select all polygons which will assembly the ID of interest,
create a MASK (or MASKs) based on them, trim, remove MASK(s).
Maybe, it's only necessary to treat for boundaries?
Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150118/4f8cdde9/attachment-0001.pgp>
More information about the grass-user
mailing list