openTdataCH / ojp-sdk

Meta OJP SDK repo
MIT License
4 stars 0 forks source link

Address is not modeled correctly in PlaceResult (LIR) #142

Open ue71603 opened 2 months ago

ue71603 commented 2 months ago

Currently


<OJP xmlns:siri="http://www.siri.org.uk/siri" xmlns="http://www.vdv.de/ojp" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vdv.de/ojp ../../../OJP4/OJP.xsd">
    <OJPResponse>
        <siri:ServiceDelivery>
            <siri:ResponseTimestamp>2024-09-25T12:54:23.0034366+02:00</siri:ResponseTimestamp>
            <siri:ProducerRef>MENTZ</siri:ProducerRef>
            <OJPLocationInformationDelivery>
                <siri:ResponseTimestamp>2024-09-25T12:54:23.003466+02:00</siri:ResponseTimestamp>
                <siri:RequestMessageRef>b9156b3e-d1db-475e-b5f3-bc03dc21b0c8</siri:RequestMessageRef>
                <siri:DefaultLanguage>de</siri:DefaultLanguage>
                <CalcTime>4</CalcTime>
                <PlaceResult>
                    <Place>
                        <Address>
                            <Name>
                                <Text xml:lang="de">Zürich, Staffelstrasse 12</Text>
                            </Name>
                            <PostCode/>
                            <TopographicPlaceName>Zürich</TopographicPlaceName>
                            <TopographicPlaceRef>23026261:1500000003</TopographicPlaceRef>
                            <Street>Staffelstrasse</Street>
                            <HouseNumber>12</HouseNumber>
                        </Address>
                        <Name>
                            <Text xml:lang="de">Staffelstrasse 12 (Zürich)</Text>
                        </Name>
                        <GeoPosition>
                            <siri:Longitude>8.52063</siri:Longitude>
                            <siri:Latitude>47.36084</siri:Latitude>
                        </GeoPosition>
                    </Place>
                    <Complete>true</Complete>
                    <Probability>1</Probability>
                </PlaceResult>
            </OJPLocationInformationDelivery>
        </siri:ServiceDelivery>
    </OJPResponse>
</OJP>

Correct:


<OJP xmlns:siri="http://www.siri.org.uk/siri" xmlns="http://www.vdv.de/ojp" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vdv.de/ojp ../../../OJP4/OJP.xsd">
    <OJPResponse>
        <siri:ServiceDelivery>
            <siri:ResponseTimestamp>2024-09-25T12:54:23.0034366+02:00</siri:ResponseTimestamp>
            <siri:ProducerRef>MENTZ</siri:ProducerRef>
            <OJPLocationInformationDelivery>
                <siri:ResponseTimestamp>2024-09-25T12:54:23.003466+02:00</siri:ResponseTimestamp>
                <siri:RequestMessageRef>b9156b3e-d1db-475e-b5f3-bc03dc21b0c8</siri:RequestMessageRef>
                <siri:DefaultLanguage>de</siri:DefaultLanguage>
                <CalcTime>4</CalcTime>
                <PlaceResult>
                    <Place>
                        <Address>
                            <PublicCode>12311231</PublicCode>
                            <Name>
                                <Text xml:lang="de">Zürich, Staffelstrasse 12</Text>
                            </Name>
                            <TopographicPlaceName>Zürich</TopographicPlaceName>
                            <TopographicPlaceRef>23026261:1500000003</TopographicPlaceRef>
                            <Street>Staffelstrasse</Street>
                            <HouseNumber>12</HouseNumber>
                        </Address>
                        <Name>
                            <Text xml:lang="de">Staffelstrasse 12 (Zürich)</Text>
                        </Name>
                        <GeoPosition>
                            <siri:Longitude>8.52063</siri:Longitude>
                            <siri:Latitude>47.36084</siri:Latitude>
                        </GeoPosition>
                    </Place>
                    <Complete>true</Complete>
                    <Probability>1</Probability>
                </PlaceResult>
            </OJPLocationInformationDelivery>
        </siri:ServiceDelivery>
    </OJPResponse>
</OJP>

the request:

<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns="http://www.vdv.de/ojp" xmlns:siri="http://www.siri.org.uk/siri" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vdv.de/ojp OJP_changes_for_v1.1/OJP.xsd">
    <OJPRequest>
        <siri:ServiceRequest>
            <siri:RequestTimestamp>2024-09-25T12:00:00</siri:RequestTimestamp>
            <siri:RequestorRef>MENTZRegTest</siri:RequestorRef>
            <OJPLocationInformationRequest>
                <siri:RequestTimestamp>2024-09-25T12:00:00</siri:RequestTimestamp>
                <siri:MessageIdentifier>4711</siri:MessageIdentifier>
                <InitialInput>
                    <GeoPosition>
                        <siri:Longitude>8.52062</siri:Longitude>
                        <siri:Latitude>47.36085</siri:Latitude>
                    </GeoPosition>
                </InitialInput>
                <Restrictions>
                    <Type>address</Type>
                    <NumberOfResults>10</NumberOfResults>
                </Restrictions>
            </OJPLocationInformationRequest>
        </siri:ServiceRequest>
    </OJPRequest>
</OJP>
ue71603 commented 2 months ago

other problem with this request


<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns="http://www.vdv.de/ojp" xmlns:siri="http://www.siri.org.uk/siri" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vdv.de/ojp OJP_changes_for_v1.1/OJP.xsd">
    <OJPRequest>
        <siri:ServiceRequest>
            <siri:RequestTimestamp>2024-09-25T12:00:00</siri:RequestTimestamp>
            <siri:RequestorRef>MENTZRegTest</siri:RequestorRef>
            <OJPLocationInformationRequest>
                <siri:RequestTimestamp>2024-09-25T12:00:00</siri:RequestTimestamp>
                <siri:MessageIdentifier>LIR-2c</siri:MessageIdentifier>
                <InitialInput>
                    <GeoRestriction>
                        <Rectangle>
                            <UpperLeft>
                                <siri:Longitude>8.51889</siri:Longitude>
                                <siri:Latitude>47.36261</siri:Latitude>
                            </UpperLeft>
                            <LowerRight>
                                <siri:Longitude>8.52887</siri:Longitude>
                                <siri:Latitude>47.35774</siri:Latitude>
                            </LowerRight>
                        </Rectangle>
                    </GeoRestriction>
                </InitialInput>
                <Restrictions>
                    <Type>address</Type>
                    <NumberOfResults>10</NumberOfResults>
                </Restrictions>
            </OJPLocationInformationRequest>
        </siri:ServiceRequest>
    </OJPRequest>
</OJP>

Currently:


                <PlaceResult>
                    <Place>
                        <Address>
                            <PublicCode>streetID:1022647479::-1</PublicCode>
                            <Name>
                                <Text xml:lang="de">UNBEKANNT</Text>
                            </Name>
                        </Address>
                        <GeoPosition>
                            <siri:Longitude>8.52373</siri:Longitude>
                            <siri:Latitude>47.36017</siri:Latitude>
                        </GeoPosition>
                    </Place>
                    <Complete>true</Complete>
                    <Probability>0.95</Probability>
                </PlaceResult>

Also Address has the name two times. Correct:


                <PlaceResult>
                    <Place>
                        <Address>
                            <PublicCode>streetID:1022647479::-1</PublicCode>
                            <Name>
                                <Text xml:lang="de">UNBEKANNT</Text>
                            </Name>
                        </Address>
                        <Name>
                            <Text>name again</Text>
                        </Name>
                        <GeoPosition>
                            <siri:Longitude>8.52373</siri:Longitude>
                            <siri:Latitude>47.36017</siri:Latitude>
                        </GeoPosition>
                    </Place>
                    <Complete>true</Complete>
                    <Probability>0.95</Probability>
                </PlaceResult>