Spectrum Technology Platform

Expand all | Collapse all

My first Data flow Service (URL Assistance please)

  • 1.  My first Data flow Service (URL Assistance please)

    Posted 11-26-2019 23:40
    Hi Guys,

    I've just created a pretty simple service in Enterprise Designer.

    X & Y Coords bring back some property details based on a spatial join.   (Variables:-  x,y)

    The model works and I can get data results from "Management Studio" - Pictured below.

    Question is how do I structure the url of the REST service to bring back a result also ??

    http://mscvdcssa18:8080/rest/PointToPropTest?_wadl


    Thanks in advance


    ------------------------------
    Tim Warfe
    GIS Officer
    MOORABOOL SHIRE COUNCIL
    ------------------------------


  • 2.  RE: My first Data flow Service (URL Assistance please)

    Employee
    Posted 11-26-2019 23:50
    Hi Tim,

    You could try this for json response...
    http://mscvdcssa18:8080/rest/PointToPropTest/results.json?Data.x=16077638.48&Data.y=-4529792.03
    or for xml response you will use...
    http://mscvdcssa18:8080/rest/PointToPropTest/results.xml?Data.x=16077638.48&Data.y=-4529792.03

    let us know if that works...

    Here is some additional documentation on how to use REST calls as well.
    https://support.pb.com/help/spectrum/18.2/en/webhelp/WebServicesGuide/index.html#WebServicesGuide/source/RESTInterface.html

    - Joe

    ------------------------------
    Joe Pulickal
    Knowledge Community Shared Account
    Shelton CT
    ------------------------------



  • 3.  RE: My first Data flow Service (URL Assistance please)

    Posted 11-27-2019 15:54
    Thank you @Joe Pulickal for your very quick response!!

    That works great, tried it with a few different coords and it works as expected.  ​

    ------------------------------
    Tim Warfe
    GIS Officer
    MOORABOOL SHIRE COUNCIL
    ------------------------------



  • 4.  RE: My first Data flow Service (URL Assistance please)

    Posted 12-05-2019 08:40
    ​I am interested in viewing the response but the links do not work.

    ------------------------------
    John Riggi
    Technical Analyst
    Chubb Insurance Group
    Whitehouse Station NJ
    ------------------------------



  • 5.  RE: My first Data flow Service (URL Assistance please)

    Posted 12-08-2019 16:59
    Hi @John Riggi

    Those URLs are for our internal network Spectrum Server so won't be accessible at your site.

    It returns a json response of property information based on the Coords passed through the URL.

    Eg......

    {
    "Output" : [ {
    "PropertyNumber" : "375844",
    "Geometry" : {
    "srsName" : "epsg:3857",
    "Pos" : {
    "X" : 1.607763848E7,
    "Y" : -4529792.03
    }
    },
    "x" : 1.607763848E7,
    "y" : -4529792.03,
    "EZI_ADDRESS" : "16 DARLEY DRIVE DARLEY 3340",
    "PropertyStreetAddress" : "16 Darley Drive",
    "PropertyLocality" : "Darley",
    "PropertyPostcode" : "3340",
    "GAZETTED_LGA_NAME" : "MOORABOOL SHIRE",
    "ROAD_NAME" : "DARLEY",
    "ROAD_TYPE" : "DRIVE",
    "user_fields" : [ ]
    } ]
    }​

    ------------------------------
    Tim Warfe
    GIS Officer
    MOORABOOL SHIRE COUNCIL
    ------------------------------



  • 6.  RE: My first Data flow Service (URL Assistance please)

    Employee
    Posted 12-10-2019 15:59
    Tim,
    While learning how to create and use custom services is very important, I wanted to make sure you knew that Spectrum Spatial comes with a very full suite of spatial searching services out of the box. These all return GeoJSON which is the standard for spatial services in REST.
    For example,
    This query
    http://<server:port>//rest/Spatial/FeatureService/tables/Samples/NamedTables/WorldcapTable/features.json;attributes=Capital,Cap_Pop;?q=searchAtPoint&point=-75.69812, 45.41117,EPSG:4326&tolerance=10%20mi
    searches for data in the sample WorldcapTable   for points within 10 miles  of the input point.
    The response returns the record, the distance and the table metadata associated with it.
    {
     "type": "FeatureCollection",
     "features": [
      {
       "type": "Feature",
       "properties": {
        "Capital": "Ottawa",
        "Cap_Pop": 920000.0,
        "Distance": 3.435079155554653
       },
       "geometry": null,
       "id": 143
      }
     ],
     "Metadata": [
      {
       "name": "Capital",
       "type": "String"
      },
      {
       "name": "Cap_Pop",
       "type": "Decimal",
       "fractionalDigits": 0,
       "totalDigits": 8
      },
      {
       "name": "Distance",
       "type": "Double"
      }
     ]
    }
    There are also POST versions for much more complicated queries.  The documentation is here.
    http://support.pb.com/help/spectrum/19.1/en/webhelp/Spatial/index.html#Spatial/source/Development/devguide/rest/feature.html


    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 7.  RE: My first Data flow Service (URL Assistance please)

    Posted 12-11-2019 16:51
    Edited by Tim Warfe 12-11-2019 19:54
    Thank you @Eric Blasenheim, that's a great tip to know.​

    I managed to select properties within 50 metres of the inputted coords.

    http://mscvdcssa18:8080/rest/Spatial/FeatureService/tables/Moorabool/Data/vw_Property/features.json;attributes=PROP_PROPNUM,EZI_ADDRESS;?q=searchAtPoint&point=16077638.48,%20-4529792.03,EPSG:3857&tolerance=50%20m

    {
    "type" : "FeatureCollection",
    "features" : [
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375844",
    "EZI_ADDRESS" : "16 DARLEY DRIVE DARLEY 3340",
    "Distance" : 0
    },
    "geometry" : null,
    "id" : 4238
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375842",
    "EZI_ADDRESS" : "18 DARLEY DRIVE DARLEY 3340",
    "Distance" : 17.07854915920817
    },
    "geometry" : null,
    "id" : 4237
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375846",
    "EZI_ADDRESS" : "14 DARLEY DRIVE DARLEY 3340",
    "Distance" : 24.337148874299697
    },
    "geometry" : null,
    "id" : 4239
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375758",
    "EZI_ADDRESS" : "1 ANGLISS COURT DARLEY 3340",
    "Distance" : 44.164477349217215
    },
    "geometry" : null,
    "id" : 4249
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375756",
    "EZI_ADDRESS" : "21 DARLEY DRIVE DARLEY 3340",
    "Distance" : 44.310225595114595
    },
    "geometry" : null,
    "id" : 4248
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375838",
    "EZI_ADDRESS" : "20 DARLEY DRIVE DARLEY 3340",
    "Distance" : 44.940739441362915
    },
    "geometry" : null,
    "id" : 4236
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375770",
    "EZI_ADDRESS" : "25 DARLEY DRIVE DARLEY 3340",
    "Distance" : 48.13084456659673
    },
    "geometry" : null,
    "id" : 4255
    },
    {
    "type" : "Feature",
    "properties" : {
    "PROP_PROPNUM" : "375754",
    "EZI_ADDRESS" : "19 DARLEY DRIVE DARLEY 3340",
    "Distance" : 48.612007627349705
    },
    "geometry" : null,
    "id" : 4247
    }
    ],
    "Metadata" : [
    {
    "name" : "PROP_PROPNUM",
    "type" : "String"
    },
    {
    "name" : "EZI_ADDRESS",
    "type" : "String"
    },
    {
    "name" : "Distance",
    "type" : "Double"
    }
    ]
    }

    ------------------------------
    Tim Warfe
    GIS Officer
    MOORABOOL SHIRE COUNCIL
    ------------------------------



  • 8.  RE: My first Data flow Service (URL Assistance please)

    Posted 12-23-2019 18:52
    Edited by Tim Warfe 12-23-2019 18:58
    Now that I have services running within the Spectrum Platform for object, buffer and Find Nearest.

    Is there a way of having the service URL run without the need of entering user credentials?

    Thanks in advance.

    MERRY CHRISTMAS!!!

    Tim

    ------------------------------
    Tim Warfe
    GIS Officer
    MOORABOOL SHIRE COUNCIL
    ------------------------------



  • 9.  RE: My first Data flow Service (URL Assistance please)

    Employee
    Posted 01-02-2020 10:59
    Tim,
    ​Possibly the most hated answer but here it goes.
    Yes and No!
    Yes in that you can configure spectrum to ignore either REST or SOAP or both to ignore authentication (service completely open) for user and built in services. This means that Spatial services and services that you create would not require authentication.  Note that this feature is very commonly used for map tiling, for example.  The management tools and services, like Management Console and Spatial Manager, still require authentication.
    The "No" part is that you cannot do this on a service by service basis. All the REST (or SOAP) services are either open or not.
    To do this for just a single service while requiring credentials for everything else would require a proxy that then sends known credentials along  for just this service.
    To configure the service to be open, a property in the spectrum-container.properties file has to be changed and spectrum restarted.
    That file is located in <install dir> server/app/conf in versions prior to 2019.1 and  <install dir> server/conf in the latest version.

    Here's the doc from the latest version
    http://support.pb.com/help/spectrum/19.1/en/webhelp/AdministrationGuide-WebUI/index.html#Spatial/source/Administration/config/repository/turnoffsecurity.html




    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------