public static void geojsonType ( GeoJson value , String type , String name ) { if ( type == null || type . length ( ) == 0 || name == null || name . length ( ) == 0 ) { throw new TurfException ( "Type and name required" ) ; } if ( value == null || ! value . type ( ) . equals ( type ) ) { throw new TurfException ( "Invalid input to " + name + ": must be a " + type + ", given " + ( value != null ? value . type ( ) : " null" ) ) ; } }
Enforce expectations about types of GeoJson objects for Turf .