/** * _more_ * * @param request _more_ * @param entry _more_ * @param parent _more_ * @param newEntry _more_ * @throws Exception _more_ */ public void initializeEntryFromForm(Request request, Entry entry, Entry parent, boolean newEntry) throws Exception { if (!entry.isFile()) { return; } EsriShapefile shapefile = new EsriShapefile(entry.getFile().toString()); Rectangle2D bounds = shapefile.getBoundingBox(); double[][] lonlat = new double[][] {{bounds.getX()}, {bounds.getY() + bounds.getHeight()}}; ProjFile projFile = shapefile.getProjFile(); if (projFile != null) { lonlat = projFile.convertToLonLat(lonlat); } entry.setNorth(lonlat[IDX_LAT][0]); entry.setWest(lonlat[IDX_LON][0]); lonlat[IDX_LAT][0] = bounds.getY(); lonlat[IDX_LON][0] = bounds.getX() + bounds.getWidth(); if (projFile != null) { lonlat = projFile.convertToLonLat(lonlat); } entry.setSouth(lonlat[IDX_LAT][0]); entry.setEast(lonlat[IDX_LON][0]); }