Hi,

The GML to slip in into JPEG2000 looks about like this:

<gml:FeatureCollection
 xmlns:gml="http://www.opengis.net/gml";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://www.opengis.net/gml 
http://www.math.ubc.ca/~burggraf/gml/gml4jp2.xsd";>
 <gml:boundedBy>
  <gml:Null>withheld</gml:Null>
 </gml:boundedBy>
 <gml:featureMember>
  <gml:RectifiedGridCoverage dimension="2" gml:id="RGC0001">
   <gml:rectifiedGridDomain>
    <gml:RectifiedGrid dimension="2">
     <gml:limits>
      <gml:GridEnvelope>
       <gml:low>0 0</gml:low>
       <gml:high>11999 11999</gml:high>
      </gml:GridEnvelope>
     </gml:limits>
     <gml:axisName>x</gml:axisName>
     <gml:axisName>y</gml:axisName>
     <gml:origin>
      <gml:Point gml:id="P0001" srsName="urn:ogc:def:crs:EPSG::3067">
       <gml:pos>356000.2500000000000 7595999.7500000000000</gml:pos>
      </gml:Point>
     </gml:origin>
     <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::3067">0.5000000000000 
-0.0000000000000</gml:offsetVector>
     <gml:offsetVector srsName="urn:ogc:def:crs:EPSG::3067">-0.0000000000000 
-0.5000000000000</gml:offsetVector>
    </gml:RectifiedGrid>
   </gml:rectifiedGridDomain>
  </gml:RectifiedGridCoverage>
 </gml:featureMember>
</gml:FeatureCollection>

You can write such by hand but it is not a pleasure.
- You will need to know the image dimensions in pixels for setting gml:low and 
gml:high
- Anchor point of gml:origin is in the middle of the corner pixel. In the 
example origin is in the top left corner and coordinates in EPSG:3067 are 
presented in Easting-Northing direction.  Be aware that the axis order must 
match the official EPSG definitions and for example for EPSG:4326 it is 
Latitude-Longitude.
- In the example offset vectors go from West to East and from North to South at 
0.50 m steps but because the North coordinate is decreasing by each step the 
offset vector shows negative value.

I believe that I wouldn't bother to go that way if world files (.j2w of .wld) 
would do the job possibly together with .prj for defining the projection.

There are also different interpretations about the anchor point of gml:origin. 
One major image processing software is using the corner of the corner pixel as 
an anchor point and I have not seen a straight answer to which interpretation 
is correct. GDAL believes in the centre of a pixel.  I try to avoid using GML 
in JPEG2000 even it is an OGC standard.

-Jukka Rahkonen-

 
t.przysiwek wrote:


 
> Hi,
> 
> thanks for your help.
> 
> I got a lot of jp2 files (about 5000) generated via Kakadu and if possible I 
> would
> like to not manipulate on pixels and just batch insert geolocation data 
> inside.
> The only data I've got for files, are coordinates like:
> 52.700178,6.277880
> 52.662452,6.277880
> 52.662452,6.301401
> 52.700178,6.301401
> 
> In my opinion, solution suggested by Rahkonen Jukka (GML attach 1.1) is what I
> need, but how to correctly generate gml file, f.e. calculate offsetVector:
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-
> JP2-raster-layer-to-server-tp5090126p5091405.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance 
> affects
> their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, 
> &
> PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to