#1024 closed defect (fixed)

Petascope ingestion of non-geo-referenced images

Reported by: mdumitru Owned by: vmerticariu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: Cc:
Complexity: Medium

Description (last modified by mdumitru)

When importing this GML (http://pastebin.com/RfhmM4T1) I get a coverage that starts at (1,1), although the origin is set at (0.5, 0.5). Is this correct behavior? I am assuming some rounding is performed somewhere for Index2D CRSes.

Attachments (1)

afteringestion.gml (3.1 KB) - added by bphamhuu 20 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 21 months ago by vmerticariu

Can you attach the coverage description after ingestion?

comment:2 Changed 20 months ago by bphamhuu

I think the reason is based on this function and also want to know why need to do this? Please answer if you have time.

  def get_origin(self):
	        """
	        Returns the origin of the dataset. This is calculated using the origin from the dataset + 0.5 of an offset
	                vector, as petascope requires it so.
	        :rtype: list[str]
	        """
	        geo = self.gdal_dataset.GetGeoTransform()
	        # Add 0.5 * size of pixel to make sure there's no error in petascope
	        # Should be removed once petascope handles numeric computations correctly
	        return str(geo[0] + 0.5 * self.gdal_dataset.GetGeoTransform()[1]), \
	               str(geo[3] + 0.5 * self.gdal_dataset.GetGeoTransform()[5])

comment:3 Changed 20 months ago by mdumitru

@Bang: The origin in petascope is considered to be in the middle of the geopixel, that is top-left corner + 0.5 offset vector. The whole geo-model is described here http://www.rasdaman.org/wiki/PetascopeUserGuide
The comment delimited by # is not correct, only the one between """ """ is.

This is a bug in petascope.wcst, not in WCSTImport, the created coverage is correct.

Changed 20 months ago by bphamhuu

comment:4 Changed 20 months ago by bphamhuu

Thanks Alex for your time I will read the article, I also would like to add the file as Vlad requested.

comment:5 Changed 19 months ago by dmisev

  • Milestone set to 10.0

comment:6 Changed 18 months ago by dmisev

  • Owner changed from vmerticariu to bphamhuu
  • Status changed from new to assigned

comment:7 Changed 18 months ago by mdumitru

  • Description modified (diff)
  • Owner changed from bphamhuu to vmerticariu

comment:8 follow-up: Changed 18 months ago by mdumitru

  • Description modified (diff)

Please leave it assigned to Vlad. This is more of a standards decision than actual implementation.
@Vlad Should the origin be in the middle of the pixel for non-georef grids as well?

comment:9 Changed 16 months ago by bphamhuu

http://rasdaman.org/wiki/PetascopeSubsets I update this ticket with the correct document why it is "of half-pixel on all sides" (or + 0.5).

By the way, in here, you can see that the origin is chosen on top-left

 As often done in GIS applications, the origin of an image is set to be its upper-left corner: 
this finally means that the origin of our rectified and referenceable grid coverages shall be there too in order to provide a coherent GML/GMLCOV coverage. 
Note that placing the origin in the upper-left corner of an image means that the offset vector along the northing axis will point South, hence will have negative norm (in case the direction of the CRS axis points North!).

comment:10 in reply to: ↑ 8 Changed 16 months ago by bphamhuu

Replying to mdumitru:

Please leave it assigned to Vlad. This is more of a standards decision than actual implementation.
@Vlad Should the origin be in the middle of the pixel for non-georef grids as well?

Acording to http://rasdaman.org/wiki/PetascopeSubsets

regular axis: when a grid axis has equal spacing between each of its points, 
then it is assumed that the sample space of the points is equal to this spacing
(resolution) and that the grid points are in the middle of this interval; 

So the answer for Alex is yes as non-georeference grid is a 100% regular axis.

comment:11 Changed 10 months ago by bphamhuu

  • Component changed from undecided to petascope
  • Milestone changed from 10.0 to 9.3
  • Resolution set to fixed
  • Status changed from assigned to closed

with the patch for using wcst_import to import all 3 types of coverage in system test, the origin of these RectifiedCoverage? (mr, rgb) is set correct when GetCoverage? http://pastebin.com/wMUWj8pW, so I think we can close this ticket here.

Note: See TracTickets for help on using tickets.