public FreeFormPointSet slice(List<String> ids){
  FreeFormPointSet ret=new FreeFormPointSet(ids.size());
  HashSet<String> idsHashSet=new HashSet<String>(ids);
  ret.id=id;
  ret.label=label;
  ret.description=description;
  int n=0;
  for (int i=0; i < this.ids.length; i++) {
    if (idsHashSet.contains(this.ids[i])) {
      ret.lats[n]=this.lats[i];
      ret.lons[n]=this.lons[i];
      ret.ids[n]=this.ids[i];
      ret.polygons[n]=this.polygons[i];
      n++;
    }
  }
  return ret;
}

public FreeFormPointSet slice ( List < String > ids ) { FreeFormPointSet ret = new FreeFormPointSet ( ids . size ( ) ) ; HashSet < String > idsHashSet = new HashSet < String > ( ids ) ; ret . id = id ; ret . label = label ; ret . description = description ; int n = 0 ; for ( int i = 0 ; i < this . ids . length ; i ++ ) { if ( idsHashSet . contains ( this . ids [ i ] ) ) { ret . lats [ n ] = this . lats [ i ] ; ret . lons [ n ] = this . lons [ i ] ; ret . ids [ n ] = this . ids [ i ] ; ret . polygons [ n ] = this . polygons [ i ] ; n ++ ; } } return ret ; }
get a subset of this point set containing only the specified point ids .
