Setting Impedance Cutoffs in Java

437
2
09-19-2019 03:31 PM
jamesgirard
New Contributor

When solving for a service area in java, how does one set the impedance cutoffs or default breaks as per this document:

 

Generate service areas—ArcGIS Runtime SDK for Java | ArcGIS for Developers 

under the Other Service Area Parameters properties section.

 

ServiceAreaParameters doesn't have a setImpedanceCutoffs() or setDefaultBreaks() method, as would seem to be implied by the document.  It does have a getDefaultImpedanceCutoffs() method.

Neither does ServiceAreaFacility.

 

Thanks!

-J

0 Kudos
2 Replies
JonL
by Esri Contributor
Esri Contributor

Hi James,

you can set the impedance parameters to your desired value(s) by first clearing the default parameters:

serviceAreaParameters.getDefaultImpedanceCuttoffs().clear();

And then adding your own values into the default impedance cuttoffs, e.g. for 1 and 3 min:

serviceAreaParameters.getDefaultImpedanceCuttoffs().addAll(Arrays.asList(1.0, 3.0));

Hope this answers your question, please let us know if you have any further problems.

Jonathan

0 Kudos
jamesgirard
New Contributor

Worked fantastic - thank you!

0 Kudos