keep a copy in the ml.. s.b. ..ede On 21.01.2018 21:14, Rahkonen Jukka (MML) wrote: > Hi, > > Sorry, I started to write a reasoned answer but led me to read the GML2 > standard and think about different and even rather special use cases and I > lost my focus. I will try now again. > > 1) Main use of gml:boundedBy for us is to use it as a container for SRID > (srsName). > 2) However, boundedBy contains also the extent of the dataset and we may > consider how useful that additional information is. > 3) If we name it as gml:boundedBy we should use it so that it is valid in GML2 > > Let's start from 3). What the standard says is > - boundedBy is expressed as BoundingShape > - There are two alternatives for a BoundingShapes > -Bounding shapes--a Box or a null element are currently allowed. > - boundedBy is mandatory for a featureCollection because of > "AbstractFeatureCollectionBaseType" > This abstract base type just makes the boundedBy element mandatory > for a feature collection. > > About gml:Box > - The Box structure defines an extent using a pair of coordinate tuples. > - Two alternatives for giving the tuples for Box. > - gml:coord or gml:coordinates > NOTE: Using one or another is mandatory, Box cannot be empty > - The Box geometry (which represents the 'bounding box' of the feature > collection) is expressed in the SRS identified by the value of the srsName > attribute > - A value for the srsName attribute should be provided, since a Box cannot be > contained by other geometry classes. > NOTE: In the language of OGC standards "should" means usually that it is > conditional. Therefore it may be OK also have gml:Box without srsName > attribute. > > About gml:null > "If a bounding shape is not provided for a feature collection, explain why. > Allowable values are: > innapplicable - the features do not have geometry > unknown - the boundingBox cannot be computed > unavailable - there may be a boundingBox but it is not divulged > missing - there are no features" > Usage example: > <gml:boundedBy> > <gml:null>unknown</gml:null> > </gml:boundedBy> > NOTE: It is impossible to give the SRID for a layer that does not have > geometries with gml:null because there is no place for srsName. > > Some considerations about JML and boundedBy metadata > - SRID is important > - boundedBy could be useful for some use cases. For example just getting a > fast report about contents of a JML file with GDAL utility "ogrinfo" takes 20 > seconds with a file having 100000 polygons because ogrinfo wants to know the > extent of the layer and feature count. Same applies to QGIS > - Having extend directly available would save time because there would be no > need to compute the aggregated extent from the geometries. > - However, the whole file must still be scanned through for getting the > number of features. > - Because of the structure of JML file it must be read totally before it can > be used by any GIS software > Conclusion: Extent without SRID is not especially valuable metadata for JML. > > Unfortunately my considerations lead to some open questions: > What to do is SRID is not known? > 1) Do not write boundedBy at all > - This is the current behavior > - GML2 is not valid because featurecollection must have boundedBy but that > has never bothered us > 2) Write bounded by with gml:Box that does not have srsName attribute > - probably valid GML > - not very valuable info > > What to do if layer is empty or all feature have only empty geometries but > SRID is known? > 1) Follow GML and write boundedBy as null, but then there is no place for > srsName > 2) Use a dummy bounding box of (0,0 -1,-1) > - boundedBy is not real and does not match with feature data but there is > place to insert srsName > - this is the current behavior > 3) Do not write boundedBy at all > - GML2 is not valid > - not a big loss because such datasets are quite special any way. > > It is hard to decide what to do but right now I feel like this: > SRID not known: > Write gml:Box without srsName > > boundedBy not known because none feature has geometry: > Write a dummy boundedBy of (0,0 -1,-1). > > -Jukka- > > -----Alkuperäinen viesti----- > Lähettäjä: Edgar Soldin [mailto:ed...@soldin.de] > Lähetetty: 21. tammikuuta 2018 14:59 > Vastaanottaja: Rahkonen Jukka (MML) <jukka.rahko...@maanmittauslaitos.fi> > Aihe: Fwd: Re: [JPP-Devel] New SRID system and unknown SRID > > Jukka? > > i could add that before the next release, but would need some infos > beforehand. s.b. > > ..ede > > > -------- Forwarded Message -------- > Subject: Re: [JPP-Devel] New SRID system and unknown SRID > Date: Thu, 18 Jan 2018 14:51:36 +0100 > From: edgar.sol...@web.de > Reply-To: OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net> > To: jump-pilot-devel@lists.sourceforge.net > > On 18.01.2018 14:30, Rahkonen Jukka (MML) wrote: >> Hi, >> >> I feel that you did not quite get what I had in my mind. At the >> moment if layer has an unknown SRID OJ does know the envelope and reports it >> in the layer properties, but it is not saved with JML as boundedBy >> (one_point_no_srid.jml) If SRID is set then >> <CRSElement>boundedBy</CRSElement> and boundedBy get added >> (one_point_srid_4326). >> >> My question (suggestion) was if boundedBy could be written also in case of >> unknown SRID like in (suggestion_one_point_no_srid.jml). > > of course it can. question is what reader probably needs/uses the saved > envelope, is there any? > >> I made also some tests with layers which do not have any geometries >> and layers which have only empty geometries. For both the envelope is >> actually non-existing but OpenJUMP seems to have an internal fake >> default envelope >> 0.00,0.00 -1.00,-1.00 >> (no_features_srid_4326.jml) >> >> GDAL developer asked me how to write the boundedBy if the envelope is null >> and gave two alternatives. >> >> 1) Use gml:null >> >> <gml:boundedBy> >> <gml:null>unknown</gml:null> >> </gml:boundedBy> >> >> 2) Not to write gml:boundedBy at all but still keep >> <CRSElement>boundedBy</CRSElement> in the inputTemplate part of JML file. > > why keep "<CRSElement>boundedBy</CRSElement>" if the layer is empty anyway? > >> OpenJUMP seems to be robust and accepts both 1) and 2). And as mentioned, >> internally openJUMP seems to be using method 3) with fake 0,0 -1,-1 extent. >> Any opinions about what I will ask the GDAL developer to do? > > preferably what OJ does as well ;).. so let's wait for a decision before you > give him a go ahead. > >> I know that there is a very, very small corner case that alternatives 1) >> and 2) can't handle which is empty layers with a known SRID, or layers with >> features but no geometries. I would say that we don't care about those. > > may i suggest > > <gml:boundedBy> > <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326" /> > </gml:boundedBy> > > for layers w/o geometries otherwise empty? > > ..ede > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most engaging tech > sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel