Revision 14003

View differences:

branches/v10/extensions/extOracleSpatial/src/es/prodevelop/cit/gvsig/fmap/drivers/jdbc/oracle/OracleSpatialDriver.java
56 56

  
57 57
import com.iver.cit.gvsig.fmap.DriverException;
58 58
import com.iver.cit.gvsig.fmap.core.DefaultFeature;
59
import com.iver.cit.gvsig.fmap.core.FGeometry;
59 60
import com.iver.cit.gvsig.fmap.core.FGeometryCollection;
60 61
import com.iver.cit.gvsig.fmap.core.FMultiPoint2D;
61 62
import com.iver.cit.gvsig.fmap.core.FNullGeometry;
......
184 185
    public static final int MAX_ID_LENGTH = 30;
185 186
    private final static GeometryFactory geomFactory = new GeometryFactory();
186 187
    public static final double IRRELEVANT_DISTANCE = 0.00000001;
187
	private static final long ID_MIN_DELAY = 200;
188
	private static final long ID_MIN_DELAY = 1000;
188 189

  
189 190
    static {
190 191
        try {
......
1459 1460
     * @return the IGeometry
1460 1461
     */
1461 1462
    public IGeometry getFMapGeometry(STRUCT st, boolean force_not_collection) {
1463
    	
1464
    	if (st == null) {
1465
    		return new FNullGeometry();
1466
    	}
1467
    	
1462 1468
        Datum[] the_data = null;
1463 1469

  
1464 1470
        try {
......
1476 1482
            IGeometry ig = null;
1477 1483

  
1478 1484
            if (isActuallyACollection(the_data)) {
1485
            	logger.debug("isActuallyACollection(the_data) = TRUE");
1479 1486
                jgtype = FShape.MULTI;
1480 1487
            }
1481 1488

  
......
1839 1846
        }
1840 1847
        catch (SQLException se) {
1841 1848
            logger.error("While checking collection: " + se.getMessage());
1842

  
1843 1849
            return false;
1844 1850
        }
1845 1851

  
......
1854 1860
        }
1855 1861

  
1856 1862
        if (size == 2) {
1857
            return ((info[1] % 1000) != (info[4] % 1000));
1863
            return ((info[1] % 1000) != (info[4] % 1000)) && 
1864
            ( ! ((info[1] == 1005) && (info[4] == 2)) );
1858 1865
        }
1859 1866

  
1860 1867
        int second = info[4] % 1000;
1868
        int item = 0;
1861 1869

  
1862 1870
        for (int i = 2; i < size; i++) {
1863
            if ((info[(i * 3) + 1] % 1000) != second) {
1871
        	item = info[(i * 3) + 1] % 1000;
1872
            if ((item != second) &&
1873
            		( ! ((item == 5) && (second == 2)) )
1874
            		) {
1864 1875
                return true;
1865 1876
            }
1866 1877
        }
branches/v10/extensions/extOracleSpatial/src/es/prodevelop/cit/gvsig/fmap/drivers/jdbc/oracle/OracleSpatialUtils.java
1959 1959

  
1960 1960
                for (int i = 1; i < info_array_size; i++) {
1961 1961
                    lineType = getLineToType(info_array, i);
1962
                    
1963
                    // -----------------------
1964
                    if (end_ind[i] == (start_ind[i] - 1))
1965
                    	lineType = PathIterator.SEG_MOVETO;
1966
                    // -----------------------
1967
                    
1962 1968
                    next_must_do_first = addOrdsToGPX(resp, start_ind[i] - 1,
1963 1969
                            end_ind[i] - 1, ords_array, dims, lineType,
1964
                            (i == 1), next_must_do_first);
1970
                            (i == 1) || (lineType == PathIterator.SEG_MOVETO),
1971
                            next_must_do_first);
1965 1972
                }
1966 1973
            }
1967 1974
            else {

Also available in: Unified diff