Hello,
Thank you Andrea and Jody.
I will test it, however i have problems to show data from MySQL db on map.
I try to do that on following way:
Map params = new HashMap();
params.put("dbtype", "mysql");
params.put("host", "localhost");
params.put("port", new Integer(3306));
params.put("database", "my_db");
params.put("user", "root");
MySQLDataStoreFactory mySQLFactory = new MySQLDataStoreFactory();
MySQLDataStore mySQLDatastore = (MySQLDataStore)
mySQLFactory.createDataStore(params);
// Prepare feature sources
fsStreets = mySQLDatastore.getFeatureSource("streets");
When i tried to display layer on JMapFrame i can't see anything. Values for
map bounds in JMapFrame
Status bar (min and max Lat and Lon) are all NaN.
I check ogrinfo MySQL:my_db,user=root streets -so and get:
INFO: Open of `MySQL:my_db,user=root' using driver `MySQL' successful.
Layer name: streets
Geometry: Line String
Feature Count: 930
Extent: (19.559141, 46.026719) - (19.801404, 46.168960)
Layer SRS WKT:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]]
FID Column = OGR_FID
Geometry Column = SHAPE
name: String (254.0)
oneway: String (254.0)
type: String (1.0)
What can be problem here? I make table in MySQL from shapefile without .prj
file with
following command: ogr2ogr -f "MySQL"
MYSQL:"my_db,host=localhost,user=root,port=3306" -nln "streets" -a_srs
"EPSG:4326" streets.shp
Also i try all of this with Postgis and everything works perfect.
I hope so someone can help me about this.
Best regards.
aaime wrote:
>
> iceDice ha scritto:
>> Hi Andrea,
>>
>> I know that is possible to use InnoDB tables for spatial data, however
>> without
>> support for spatial indexes.
>> What i want to know is does it make impact on GeoTools renderer.
>> I mean does renderer uses those spatial indexes from MyISAM tables or
>> maybe makes own spatial indexes?
>
> The renderer just makes bbox queries to the datastore, which in
> turn issues sql that encodes the bbox filter in whatever is the syntax
> used by MySQL.
> I think it should work, but not having a spatial index will severely
> limit the ability to scale to bigger amounts of data thought.
>
> Cheers
> Andrea
>
>
> --
> Andrea Aime
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
--
View this message in context:
http://n2.nabble.com/GeoTools-MySQL-tp3728017p3728605.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users