Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add geospatial extensions to the PRC model #7

Open
chambbj opened this issue Jun 27, 2014 · 0 comments
Open

add geospatial extensions to the PRC model #7

chambbj opened this issue Jun 27, 2014 · 0 comments

Comments

@chambbj
Copy link
Member

chambbj commented Jun 27, 2014

There exist geospatial extensions to PRC (although all of the original links to Adobe documentation now appear to be dead). The hope would be that these should provide the PDF reader with enough detail to properly display coordinates.

A former colleague put together the following notes on what it would take to implement the geospatial extensions.

oPRCFile file(filenameout.c_str()/*, ***MM_PER_COORD_FACTOR***, ***NUM_FILE_STRUCTURES*** */);

PRCCoordinateSystem *coords = new PRCCoordinateSystem(std::string("name_for_coord_system"));
//coords->setAxisSet();
uint32_t coord_id = file.addCoordinateSystem(coords);

PRCAttribute &po_attribs = product_occurrence->newAttribute();
PRCSingleAttribute *const geoAttrib = new PRCSingleAttribute(std::string("insert PRC Geo XML file"));
//possibly __PRC_RESERVED_ATTRIBUTE_GeoMasterProj  instead
geoAttrib->title_text = std::string("__PRC_RESERVED_ATTRIBUTE_GeoMasterKey");
po_attribs.addAttribute(*geoAttrib);

//on the part definitions (or something like that), set this (doing the whole rigamarole like above - getting PRCAttribute, adding it to that, etc.):
PRCSingleAttribute *const georefAttrib = new PRCSingleAttribute(std::string("<StoreCS=\"1\"/>")); //number should match the Label ID used in the "geo master proj/key" above
georefAttrib->title_text = std::string("__PRC_RESERVED_ATTRIBUTE_GeoRefProj");

//point_set is pointer to PointSet
point_set->index_local_coordinate_system = coord_id;

//part_def is pointer to part definition
part_def->addPointSet(point_set);
<AdobeGeoInfo Version="1.0">
    <GCS>
        <GeogCS>
            <Label ID="1" />
            <Origin X="" Y="" Z="" />
            <EPSG>4326</EPSG>
            <WKT>wkt string</WKT>
        </GeogCS>
        <ProjCS>
            <Label ID="1" />
            <Origin X="" Y="" Z="" />
            <EPSG>4326</EPSG>
            <WKT>wkt string</WKT>
        </ProjCS>
    </GCS>
</AdobeGeoInfo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant