Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Metoder GeoCodingAddressService –getAddressPointByAddressAccessUID –getAddressPointByAddressAccess GeographicSearchAddressService –getAddressAccesByGeometries.

Similar presentations


Presentation on theme: "1 Metoder GeoCodingAddressService –getAddressPointByAddressAccessUID –getAddressPointByAddressAccess GeographicSearchAddressService –getAddressAccesByGeometries."— Presentation transcript:

1 1 Metoder GeoCodingAddressService –getAddressPointByAddressAccessUID –getAddressPointByAddressAccess GeographicSearchAddressService –getAddressAccesByGeometries –getPostCodeByGeometries

2 2 Metoder - GeoCoding GeoCodingAddressService –getAddressPointByAddressAccessUID –getAddressPointByAddressAccess AddressAccess er Kommunekode, vejkode og nummer AccessUID er adressens unikke ID Returværdi er et objekt med AddressPointIdentifier GeographicPointLocation AddressPointStatusStructure AddressPointMetaData AddressPointPortrayal

3 3 Metoder - GetAddress getAddressAccessByGeometries(Geometry, RequestOptions) getPostCodeByGeometries(Geometry, RequestOptions)

4 4 Metoder - GetAddress getAddressAccessByGeometries(Geometry, FindAddressAccessRequestOptionsType )

5 5 Metoder getAddressAccessByGeometries(Geometry, {boolean includeAddressAccess, boolean includeAddressPostal, boolean includeAddressPoint} ) Jo flere “include...” desto mere skal joines i databasen......langsommere.

6 6 Metoder - GetAddress getAddressAccessByGeometries(GeometrySearchCollection, RequestOptions)

7 7 Metoder - GetAddress getAddressAccessByGeometries([GeometrySearchType], RequestOptions)

8 8 Metoder - GetAddress getAddressAccessByGeometries([{float searchBuffer, Geometry gml}], RequestOptions) Inden for 50 meter af denne linje Inden for denne polygon (SearchBuffer 0) Inden for 250 meter af dette punkt Flere fungerer som et logisk “or”

9 9 Metoder - GetAddress getAddressAccessByGeometries([{float searchBuffer, Geometry gml}], RequestOptions)

10 10 Mellemspil Pæn XML ≠ pæn programkode “choice” ≈ Nedarvning Geometry er en abstrakt moderklasse, Point, LineString og Polygon underklasser …men ikke helt. Det er ikke entydigt, så almindelige programmeringssprog og generatorer kan ganske simpelt ikke virke “automagisk”.

11 11 Metoder - GetAddress getAddressAccessByGeometries([GeometrySearchType], RequestOptions) getAddressAccessByGeometries([PointSearchType], RequestOptions) getAddressAccessByGeometries([LineStringSearchType], RequestOptions) getAddressAccessByGeometries([PolygonSearchType], RequestOptions)

12 12 Metoder - GetAddress getAddressAccessByGeometries([GeometrySearchType], RequestOptions) getAddressAccessByGeometries([PointSearchType], RequestOptions) getAddressAccessByGeometries([{float searchBuffer, PointType point}], RequestOptions o) getAddressAccessByGeometries([LineStringSearchType], RequestOptions) getAddressAccessByGeometries([{float searchBuffer, LineStringType lineString}], RequestOptions o) getAddressAccessByGeometries([PolygonSearchType], RequestOptions) getAddressAccessByGeometries([{float searchBuffer, PolygonType polygon}], RequestOptions o)

13 13 Import wsimport -s /Users/jwn/Documents/Code/AWSTest/src -p dk.kms.aws /GeographicSearchAddressService?wsdl wsimport -s /Users/jwn/Documents/Code/AWSTest/src -p dk.kms.aws /GeoCodingAddressService?wsdl Mangler nogle nemme constructors, men de kan hurtigt skrives Eller pakkerne kan downloades fra KMS

14 14 (Kræver JEE pakker i classpath, f.eks.webservices-rt,jar, webservices-tools.jar og activation.jar fra Glassfish installationen) import java.util.LinkedList; import java.util.List; import dk.kms.aws.*; import dk.kms.aws.util.*; public class AWSTest { public static void main(String[] args) { GeographicSearchAddressService awsSearch = new GeographicSearchAddressService_Service().getGeographicSearchAddressServicePort(); LinkedList searchCollection = new LinkedList (); searchCollection.add(new PointSearch(100, , )); try { List results = awsSearch.getAddressAccessByPoints(searchCollection, new RequestOptions(true, true, true)); for (AddressAccessDefiniteType address : results) { AddressPostalType postal = address.getAddressPostal(); CoordinateTupleType coords = address.getAddressPoint().getGeographicPointLocation().getGeographicCoordinateTuple(); System.out.println(postal.getStreetName() + " " + postal.getStreetBuildingIdentifier() + ", " + postal.getPostCodeIdentifier() + " " + postal.getDistrictName() + " (" + coords.getEasting() + ", " + coords.getNorthing() + ")" ); } catch (Exception e) { e.printStackTrace(); }


Download ppt "1 Metoder GeoCodingAddressService –getAddressPointByAddressAccessUID –getAddressPointByAddressAccess GeographicSearchAddressService –getAddressAccesByGeometries."

Similar presentations


Ads by Google