claeis / iox-ili Goto Github PK
View Code? Open in Web Editor NEWimplementation of IOX API
implementation of IOX API
In the class Iox2wkb, on line 912 is added the flag WKBConstants.ewkbIncludesZ when the geometry is 3D. But that means it is always added the Extended Well-Known Binary format.
Would it be possible to choose the standard Well-Known Binary format?
Some of the tests
Area10Test
Area23Test
Surface10Test
Surface23Test
report multiple "cut edge" problems. Is this the intention or a bug or a bad test?
Falls die RingLine nicht geschlossen wurde, wird die Konvertierung von iox nach jts wird aufgrund der
Klasse: jts.geom.LinearRing und dessen Methode: validateConstruction() und
Ausgabe: Points of LinearRing do not form a closed linestring, wird richtig durchgeführt.
Die Fehlermeldung soll zu späterer Zeit in der Klasse: ItfSurfaceLinetable2Polygon in der Meldung: invalid ring line... ausgegeben werden.
Will be useful to have a centralized plugin repository, similar to the models.interlis.ch repository. It can have the same logic implemented on RepositoryAccess. Has this been discussed before?
implement eCH-0118-2.0 encoding rules
Example
[CONFIGURATION]
baseConfig=ilidata:remoteBaseConfigBasketId;ilidata:otherRemoteBaseConfigBasketId;file:/path/otherBaseConfigLocalFile
org.interlis2.validator.config=ilidata:ilivalidatorConfigBasketId
ch.interlis.referenceData=ilidata:catalogBasketId;file:/path/localFile.xml
ilidata:
and basketIdin the following tests
are 2 different logErr messages reported:
improve so that correct rounding is verified by input that is only rounded valid but not rounded invalid
Find attached a patch.
I'm reading this docs
https://github.com/claeis/iox-ili/blob/master/doc/README.src.txt
But i can't complete successfully the compilation with "$ ant jar " command.
expected:
actual:
ilivalidatorlog:
Info: ilivalidator-1.11.12-5186e3407dc72a6947c33d84a3ac86c20c555cc2
Info: ili2c-5.2.3-3ec7a10e9bacc87e149a14a7f11a6035e0481c69
Info: iox-ili-1.21.8-a6aee68136447c0616995e56888fa9c7ef362a77
Info: User <pluethi>
Info: Start date 2021-11-29 13:35
Info: maxMemory 253440 KB
Info: dataFile <C:\Users\pluethi\Desktop\TestDataBagOf.xtf>
Info: modeldir <%ITF_DIR;http://models.interlis.ch/;%JAR_DIR/ilimodels;C:\Projects\geow-interlis-functions\src\test\data\GetLength\SetConstraintBagOf.ili;C:\Projects\geow-interlis-functions\src\model>
Info: lookup model <TestSuite> 2.4 in repository <C:\Users\pluethi\Desktop/>
Info: ilifile <C:\Users\pluethi\Desktop\SetConstraintBagOf.ili>
Info: validate data...
Info: assume unknown external objects
Info: first validation pass...
Info: C:\Users\pluethi\Desktop\TestDataBagOf.xtf: TestSuite.FunctionTestTopic BID=TestSuite.FunctionTestTopic
Error: line 5: unexpected element: {http://www.interlis.ch/xtf/2.4/TestSuite}polylineAttribute in TestSuite.FunctionTestTopic.BaseClass
Info: ...validation failed
When disabling multiple multiplicity constraints in a toml file, only the first one is logged.
TOML file:
["ModelA.TopicA.ClassA.AttributeA"]
multiplicity="off"
["ModelA.TopicA.ClassA.AttributeB"]
multiplicity="off"
ILI file:
CLASS ClassA =
AttributeA: MANDATORY TEXT*20;
AttributeB: MANDATORY TEXT*20;
END ClassA;
resulting log file:
...
Info: validate data...
Info: first validation pass...
Info: ModelA.TopicA.ClassA.AttributeA not validated, validation configuration multiplicity=off
Info: second validation pass...
...
Info: ...validation done
So before the second validation pass I expect an additional line in the log file that says that AttributeB
is not validated because multiplicity=off
.
I looks like the reason for this behavior is the way the recently introduced HashSet validationConfigOff
is used.
As can be seen in these lines in Validator.java, the string "multiplicity" is added to the HashSet validationConfigOff
and all subsequently processed attributes are therefore ignored (regarding logging of multiplicity).
Changing this behavior to adding the qualified name of the attribute to validationConfigOff
, e.g.
validationConfigOff.add(attrQName + ":" + ValidationConfig.MULTIPLICITY);
and afterwards checking for the status for exactly this attribute
if(!validationConfigOff.contains(attrQName + ":" + ValidationConfig.MULTIPLICITY)) ...
will resolve the problem.
Probably there are more elegant ways to do this. But this has worked for me without altering the definition of the HashSet.
The same issues persists with other validation checks, e. g. role cardinality (and more?)
Thanks,
Stefan
Surface10Test:
in this test is only reported 1: intersection tids o1, o1 message.
Surface23Test:
in this test are reported 2: intersection tids o1, o1, intersection tids o1, o1 messages.
which output is the correct one?
Falls ein IomObjekt mehrere Polylines hat, erzeugen die beiden Klassen doppelte Koordinaten:
Iom_jObject objSurface = new Iom_jObject(ILI_CLASSE, OBJ_OID1);
IomObject multisurfaceValue = objSurface.addattrobj("gebietseinteilung", "MULTISURFACE");
IomObject surfaceValue = multisurfaceValue.addattrobj("surface", "SURFACE");
IomObject outerBoundary = surfaceValue.addattrobj("boundary", "BOUNDARY");
IomObject polylineValue1 = outerBoundary.addattrobj("polyline", "POLYLINE");
IomObject segments1 = polylineValue1.addattrobj("sequence", "SEGMENTS");
IomObject startSegment1 = segments1.addattrobj("segment", "COORD");
startSegment1.setattrvalue("C1", "0.000");
startSegment1.setattrvalue("C2", "0.000");
IomObject endSegment1 = segments1.addattrobj("segment", "COORD");
endSegment1.setattrvalue("C1", "0.000");
endSegment1.setattrvalue("C2", "10.000");
IomObject polylineValue2 = outerBoundary.addattrobj("polyline", "POLYLINE");
IomObject segments2 = polylineValue2.addattrobj("sequence", "SEGMENTS");
IomObject startSegment2 = segments2.addattrobj("segment", "COORD");
startSegment2.setattrvalue("C1", "0.000");
startSegment2.setattrvalue("C2", "10.000");
IomObject endSegment2 = segments2.addattrobj("segment", "COORD");
endSegment2.setattrvalue("C1", "5.000");
endSegment2.setattrvalue("C2", "10.000");
IomObject polylineValue6 = outerBoundary.addattrobj("polyline", "POLYLINE");
IomObject segments6 = polylineValue6.addattrobj("sequence", "SEGMENTS");
IomObject startSegment6 = segments6.addattrobj("segment", "COORD");
startSegment6.setattrvalue("C1", "5.000");
startSegment6.setattrvalue("C2", "10.000");
IomObject endSegment6 = segments6.addattrobj("segment", "COORD");
endSegment6.setattrvalue("C1", "10.000");
endSegment6.setattrvalue("C2", "10.000");
IomObject polylineValue7 = outerBoundary.addattrobj("polyline", "POLYLINE");
IomObject segments7 = polylineValue7.addattrobj("sequence", "SEGMENTS");
IomObject startSegment7 = segments7.addattrobj("segment", "COORD");
startSegment7.setattrvalue("C1", "10.000");
startSegment7.setattrvalue("C2", "10.000");
IomObject endSegment7 = segments7.addattrobj("segment", "COORD");
endSegment7.setattrvalue("C1", "10.000");
endSegment7.setattrvalue("C2", "0.000");
IomObject polylineValue8 = outerBoundary.addattrobj("polyline", "POLYLINE");
IomObject segments8 = polylineValue8.addattrobj("sequence", "SEGMENTS");
IomObject startSegment8 = segments8.addattrobj("segment", "COORD");
startSegment8.setattrvalue("C1", "10.000");
startSegment8.setattrvalue("C2", "0.000");
IomObject endSegment8 = segments8.addattrobj("segment", "COORD");
endSegment8.setattrvalue("C1", "0.000");
endSegment8.setattrvalue("C2", "0.000");
POLYGON ((0 0, 0 10, 0 10, 5 10, 5 10, 10 10, 10 10, 10 0, 10 0, 0 0))
Korrekt wäre:
POLYGON ((0 0, 0 10, 5 10, 10 10, 10 0, 0 0))
Only four tests are required.
Remove the other, superfluous, ones.
Fix comments about what the tests test.
AdditionalConstraints23Test. mandatoryConstraint_OverlappedSurface_False
Area10Test. area2dInnerboundariesOverlapEachOther_Fail
Area10Test. area2dInnerboundaryIntersectOuterboundary_Fail
Area10Test. area2dOverlapOf2Lines_Fail
Area10Test. area3dInnerboundaryIntersectOuterboundary_Fail
Area10Test. area3dIntersectionOfInnerboundaries_Fail
Area10Test. area3dOverlapOf2Lines_Fail
Area23Test. area2dInnerIntersectOuterboundary_Fail
Area23Test. area2dIntersectionOf2Lines_Fail
Area23Test. area2dIntersectionOfInnerboundaries_Fail
Area23Test. area3dIntersectionOfInnerboundaries_Fail
Area23Test. area3dIntersectionOfOuterboundaries_Fail
Area23Test. area3dIntersectionOfOwnOuterboundary_Fail
Surface10Test. surface3dIntersectionErrs_Fail
Surface10Test. surface3dInvalidRingLines_Fail
Surface10Test. surface3dOverlapOf2Lines_Fail
Surface10Test. surfaceIntersectionErrs_Fail
Surface10Test. surfaceInvalidRingLines_Fail
Surface10Test. surfaceOverlapOf2Lines_Fail
Surface23Test. surface2DIntersectionErrs_Fail
Surface23Test. surface2dIntersectionOfInnerboundaries_Fail
Surface23Test. surface2dOverlabOf2Lines_Fail
Surface23Test. surface3dIntersectionOfInnerOuterBoundary_Fail
Surface23Test. surface3dInvalidRingLines_Fail
Surface23Test. surface3dOverlabOf2Lines_Fail
but allow for "
around names and values
Tests:
see UniqueConstraints23Test.uniqueAttrValuesOfAttrPath_InEmbeddedAssociation_Fail() test case
implement eCH-0118-2.0 encoding rules
add to class Iox2jts in folder of path: 'ch.interlis.iox_j.jts.Iox2jts'
•multicoord2JTS
•multipolyline2JTS
•multisurface2JTS
but a warning
Eventuell auch eine Konstellation von unterschiedlichen Betriebssystem und exotischen Encodings. Sollten Tabs grundsätzlich funktionieren?
task validateCsv(type: CsvValidator, dependsOn: 'downloadData') {
models = "SO_AGI_MOCheckSO_20200715"
firstLineIsHeader = true
valueDelimiter = null
valueSeparator = '\t'
encoding = "windows-1252"
dataFiles = [pathToTempFolder.toString()+"/mocheckso_errors.csv"]
}
Auch habe ich versucht den Tab aus Notepad++ zu kopieren, was aber auch nicht funktioniert. Anbei die CSV-Datei.
In der Klasse Configuration23Test wurden keine Tests gefunden die folgendes Scenario testen:
folgende Tests müssen ergänzt werden mit:
add to class Iox2jts in folder of path: 'ch.interlis.iox_j.jts.Jts2iox'
•JTS2multicoord
•JTS2multipolyline
•JTS2multisurface
Exporting a dataset with MultiSurface from postgis, ili2pg errors out when a curvepolygon contains a circularstring directly (not wrapped in a compoundcurve)
Error: line 0: Administrative_Einteilung_LV95_V1_0.Administration.Einteilung: tid 731: Attribute Geometrie has wrong number of values
Error: Object 732: failed to convert surface/area
Error: com.vividsolutions.jts.io.ParseException: Unknown WKB type 8
Error: ch.ehi.ili2pg.converter.PostgisColumnConverter.toIomMultiSurface(PostgisColumnConverter.java:450)
Error: ch.ehi.ili2db.toxtf.ToXtfRecordConverter.addAttrValue(ToXtfRecordConverter.java:629)
Error: ch.ehi.ili2db.toxtf.ToXtfRecordConverter.convertRecord(ToXtfRecordConverter.java:441)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.dumpObjHelper(TransferToXtf.java:1104)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.dumpObject(TransferToXtf.java:1080)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.doBasket(TransferToXtf.java:564)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.doit(TransferToXtf.java:293)
Error: ch.ehi.ili2db.base.Ili2db.transferToXtf(Ili2db.java:2300)
Error: ch.ehi.ili2db.base.Ili2db.runExport(Ili2db.java:1720)
Error: ch.ehi.ili2db.base.Ili2db.run(Ili2db.java:225)
Error: ch.ehi.ili2db.AbstractMain.domain(AbstractMain.java:554)
Error: ch.ehi.ili2pg.PgMain.main(PgMain.java:70)
Error: Unknown WKB type 8
Error: ch.interlis.iox_j.wkb.Wkb2iox.readGeometry(Wkb2iox.java:187)
Error: ch.interlis.iox_j.wkb.Wkb2iox.readCurvePolygon(Wkb2iox.java:386)
Error: ch.interlis.iox_j.wkb.Wkb2iox.readMultiSurface(Wkb2iox.java:469)
Error: ch.interlis.iox_j.wkb.Wkb2iox.readGeometry(Wkb2iox.java:185)
Error: ch.interlis.iox_j.wkb.Wkb2iox.read(Wkb2iox.java:131)
Error: ch.interlis.iox_j.wkb.Wkb2iox.read(Wkb2iox.java:112)
Error: ch.ehi.ili2pg.converter.PostgisColumnConverter.toIomMultiSurface(PostgisColumnConverter.java:448)
Error: ch.ehi.ili2db.toxtf.ToXtfRecordConverter.addAttrValue(ToXtfRecordConverter.java:629)
Error: ch.ehi.ili2db.toxtf.ToXtfRecordConverter.convertRecord(ToXtfRecordConverter.java:441)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.dumpObjHelper(TransferToXtf.java:1104)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.dumpObject(TransferToXtf.java:1080)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.doBasket(TransferToXtf.java:564)
Error: ch.ehi.ili2db.toxtf.TransferToXtf.doit(TransferToXtf.java:293)
Error: ch.ehi.ili2db.base.Ili2db.transferToXtf(Ili2db.java:2300)
Error: ch.ehi.ili2db.base.Ili2db.runExport(Ili2db.java:1720)
Error: ch.ehi.ili2db.base.Ili2db.run(Ili2db.java:225)
Error: ch.ehi.ili2db.AbstractMain.domain(AbstractMain.java:554)
Error: ch.ehi.ili2pg.PgMain.main(PgMain.java:70)
Here is a short example to reproduce the problem
MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0),(1 1, 3 3, 3 1, 1 1)))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.