Hi,

I have created a patch for MySQLDataStore . File attached for review . Since
I do not have commit rights , i would request
some from the PMC to commit it to the trunk.
Now the MysqlDataStore looks for two tables geometry_columns and
spatial_ref_sys to create the CRS, if not found then
it behaves as it used to before . If CRS is present then StreamingRender no
longer throws the exception as in the mail below.

@Andrea - The other thing that needs to be fixed is that if no CRS is
mentioned then the StreamingRender should not throw an Exception rather log
a warning and continue.

I am uploading the patch in jira too.

Regards
Debasish

On 3/31/07, Debasish Sahu <[EMAIL PROTECTED]> wrote:

Hi,

MySQLDataStore currently does not supports CRS , cause of which when one
tries to render mysql geometries using StreamingRendererer (2.4-M1)
the following exception is thrown

Mar 31, 2007 4:29:14 PM 
org.geotools.renderer.lite.StreamingRendererprocessSymbolizers
WARNING: null
java.lang.NullPointerException
    at
org.geotools.referencing.operation.BufferedCoordinateOperationFactory$CRSPair
.<init>(BufferedCoordinateOperationFactory.java:83)
    at
org.geotools.referencing.operation.BufferedCoordinateOperationFactory.createOperation
(BufferedCoordinateOperationFactory.java:245)
    at org.geotools.renderer.lite.StreamingRenderer.getMathTransform(
StreamingRenderer.java :2413)
    at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(
StreamingRenderer.java:1845)
    at org.geotools.renderer.lite.StreamingRenderer.process(
StreamingRenderer.java:1759)
    at org.geotools.renderer.lite.StreamingRenderer.processStylers (
StreamingRenderer.java:1704)
    at org.geotools.renderer.lite.StreamingRenderer.paint(
StreamingRenderer.java:724)
    at org.geotools.renderer.lite.StreamingRenderer.paint(
StreamingRenderer.java:446)

A possible fix is to modify the buildAttributeType to take in account the
CRS of the table or geometry .Example modification of Mulitpolygon

    return AttributeTypeFactory.newAttributeType(rs
                            .getString(COLUMN_NAME), MultiPolygon.class);

to

                    return   AttributeTypeFactory.newAttributeType(
rs.getString(COLUMN_NAME),Geometry.class, false, 0, null,
DefaultGeographicCRS.WGS84);


--
Thanks and Warm Regards
Debasish Sahu




--
Thanks and Warm Regards
Debasish Sahu

Attachment: MySQLDataStore.java
Description: Binary data

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to