Softanza
DémarrerEnglish
Softanza
La bibliothèque se documente elle-même · Géographie et cartographie

stzGeoFeatures

32 méthodes propres · 0 formes avec extensions, rangées sous leur méthode

la source: base/geo/stzGeoFeatures.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : Géographie et cartographie

Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens

Exemples : 0 viennent des tests de la bibliothèque ; 8 ont été composés à partir de la signature de chaque méthode et exécutés pour cette page, sur un objet neuf, par exemple cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}' o1 = StzGeoFeaturesFromJson(cJ). 24 méthodes n'en ont pas encore. Exemples exécutés le 2026-10-03 20:51 dans la bibliothèque au commit 0e72e2e2c.

Méthode
Explication, telle que la source la porte
ReadGeoJson
readingaucune extension
ReadTopoJson
THE ARCS ARE SHARED AND THE NUMBERS ARE DELTAS. A TopoJSON stores each border once and every shape as the arcs that bound it; -1 means arc 0 walked backwards (the format writes ~i, which is -i-1). The positions inside an arc are cumulative sums on a quantised grid and become degrees through the transform.aucune extension
Count
what it holds
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? o1.Count()
#--> 1
composé à partir de la signature, exécuté pour cette page
aucune extension
SkippedCount
how many geometries the reader could not use, counted rather than guessed at -- a record that drops counts what it dropped
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? o1.SkippedCount()
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
KindOf
(sans commentaire dans la source : le nom se lit comme une phrase) kind ofaucune extension
IdOf
(sans commentaire dans la source : le nom se lit comme une phrase) id ofaucune extension
PropertiesOf
(sans commentaire dans la source : le nom se lit comme une phrase) properties ofaucune extension
PropertyOf
(sans commentaire dans la source : le nom se lit comme une phrase) property ofaucune extension
HasProperty
(sans commentaire dans la source : le nom se lit comme une phrase) has propertyaucune extension
NameOf
what the file calls it: the first of the usual name keys it carries, or its id, or "" -- and the caller who knows better says so themselvesaucune extension
IndexOfName
(sans commentaire dans la source : le nom se lit comme une phrase) index of name
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? o1.IndexOfName("a")
#--> 1
composé à partir de la signature, exécuté pour cette page
aucune extension
PartsOf
(sans commentaire dans la source : le nom se lit comme une phrase) parts ofaucune extension
PartCount
(sans commentaire dans la source : le nom se lit comme une phrase) part countaucune extension
RingsOf
a part's rings: [1] is the outer edge, every one after it is a HOLEaucune extension
OuterRingOf
(sans commentaire dans la source : le nom se lit comme une phrase) outer ring ofaucune extension
HoleCountOf
(sans commentaire dans la source : le nom se lit comme une phrase) hole count ofaucune extension
PointsOf
every lon/lat this feature holds, flat -- what FitToPoints takesaucune extension
AllPoints
(sans commentaire dans la source : le nom se lit comme une phrase) all points
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? @@( o1.AllPoints() )
#--> [ 0, 0, 4, 0, 4, 4, 0, 4, 0, 0 ]
composé à partir de la signature, exécuté pour cette page
aucune extension
BoundsOf
[ lonMin, latMin, lonMax, latMax ]aucune extension
Bounds
(sans commentaire dans la source : le nom se lit comme une phrase) bounds
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? @@( o1.Bounds() )
#--> [ 0, 0, 4, 4 ]
composé à partir de la signature, exécuté pour cette page
aucune extension
AreaKm2Of
the biggest part by point count -- the mainland, and the only thing DN24b's reader ever kept A FEATURE'S AREA ON THE SPHERE, km2, with its holes taken out and all its parts added in. This lived in stzGeoMap.ValuesFromArea and moved here when the point patterns (GE7a) needed a window's area and the map's own copy would have been a second one -- duplicated logic diverges, and it diverges in cost first. THE AREA OF A FEATURE, km2, ON WGS84 SINCE GE8 -- outer rings added and holes taken out, which is what makes a country with a lake come out as the land and not as the outline.aucune extension
AreasKm2
every feature's area, in feature orderaucune extension
AreaKm2
the whole set's area: what a point pattern observed over all of it divides by
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? o1.AreaKm2()
#--> 196869.60
composé à partir de la signature, exécuté pour cette page
aucune extension
LargestPartOf
(sans commentaire dans la source : le nom se lit comme une phrase) largest part ofaucune extension
Contains
THE BOX FIRST. A ring test walks every edge; a box test is four comparisons, and for a point that is not in this region -- which is almost every pair a spatial join asks about -- the box is the whole answer.aucune extension
PartContains
is this place inside ONE PART of this feature? What a label placer asks: a name belongs in the part it was measured against, not merely somewhere in the country.aucune extension
IndexAt
which feature is at this place, or 0 -- what a click will ask
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? o1.IndexAt(2, 5)
#--> 0
composé à partir de la signature, exécuté pour cette page
aucune extension
Subset
taking part of a file ------------------------------------------------ SOME OF THE FEATURES, as a feature set of their own. Everything else -- the map, the atlas, the rules -- takes a feature set, so a subset is a first-class thing and not a list of indices the caller has to carry around beside it.aucune extension
Adopt
(sans commentaire dans la source : le nom se lit comme une phrase) adoptaucune extension
IndicesWithin
THE FEATURES WHOSE MIDDLE FALLS IN A BOX, by index. What "metropolitan France" means to a file that also carries Réunion and Guyane: not a political statement, a WINDOW -- the caller says which piece of the world they are drawing, and the file is unchanged.aucune extension
Within
(sans commentaire dans la source : le nom se lit comme une phrase) withinaucune extension
AsRegions
the regions the choropleth builder takes, so a file read here can go straight into DN24's picture: [ name, value, flatOuterRing ] each, from the LARGEST part of every feature
exemple composé
cJ = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"A"},"geometry":{"type":"Polygon","coordinates":[[[0,0],[4,0],[4,4],[0,4],[0,0]]]}}]}'
o1 = StzGeoFeaturesFromJson(cJ)
? @@( o1.AsRegions("a") )
#--> [ [ "A", "", [ 0, 0, 4, 0, 4, 4, 0, 4, 0, 0 ] ] ]
composé à partir de la signature, exécuté pour cette page
aucune extension