Select to view content in your preferred language

Setting Impedance Cutoffs in Java

531
2
09-19-2019 03:31 PM
jamesgirard
Emerging 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 Alum
Esri Alum

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
Emerging Contributor

Worked fantastic - thank you!

0 Kudos