Re: [postgis-users] Invalid geometry when using select AsText
On Tue, Jul 6, 2010 at 2:45 PM, rdelisabeth wrote: > "MULTIPOLYGON(((-203203.329774775 921205.762417328,-201414.754122524 > 920564.899066353,….etc etc etc ……..,-263950.345631436 > 1215368.70793936,-263772.821121782 1216068.78335908,-263784.403196605 > 1216749.98205891,-263958.177279213 1216452.48684392)))" Hi, These are cartographic coordinates, you have to request the correct SRID from whomever supplied you with the data. Good luck, Luís ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Invalid geometry when using select AsText
> Thanks for the quick response, > > This is a extract of the query AsText from the original column(before > transformation) This srid is suposed to be 4326 and I want to make it > 900913. > > "MULTIPOLYGON(((-203203.329774775 921205.762417328,-201414.754122524 > 920564.899066353,….etc etc etc ……..,-263950.345631436 > 1215368.70793936,-263772.821121782 1216068.78335908,-263784.403196605 > 1216749.98205891,-263958.177279213 1216452.48684392)))" > > btw this is a piece the geometry of norway. > > greetz...Ramses These coordinates do not correspond to WGS84 (long-lat, values between -180, +180 for longitudes, -90, +90 for latitude). Maybe try to find a SRID for Norway (spatialreference.org may help for that) Nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Invalid geometry when using select AsText
Hey Ben, thanks for the quick reply. This is a piece of the geometry: "MULTIPOLYGON(((-203203.329774775 921205.762417328,-201414.754122524 920564.899066353,….etc etc etc ……..,-263950.345631436 1215368.70793936,-263772.821121782 1216068.78335908,-263784.403196605 1216749.98205891,-263958.177279213 1216452.48684392)))" These are the values when I query AsText from the original data, and it represents a piece of norway. Does this mean anything to you? I will try the 32630 and get back to you. Ben Madin-3 wrote: > > Ramses, > > On 06/07/2010, at 17:37 , rdelisabeth wrote: > >> My problem is the following. I also have some data from my colleagues >> from >> Spain. Their data supposedly is in "WGS1984" epsg "4326". So I >> transformed >> it to 900913 as I did with my other data. So far so good. BUT when I do a >> SELECT AsText from one of the geometries I get the following: >> >> "MULTIPOLYGON(((inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf >> inf,inf >> inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf >> inf, >> ...etc etc ... inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf >> inf,inf inf,inf inf),(inf inf,inf inf,inf inf,inf inf,inf inf)))" >> >> I think this means that the geometry is invalid. When I read it from my >> application using Hibernate spatial I get an error like invalid geometry. > > I wonder if you have data from a UTM Grid - do the values look like > reasonable longitude and latitude values (in degrees) for Spain. I'm on > the wrong side of the planet to be sure what is right, but if you have any > values greater than about 45, I think you probably have WGS84 UTM values, > which would be in the 10's to 100's of thousands. > > instead of 4326 try something like 32630... just a guess. > > cheers > > Ben > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- View this message in context: http://old.nabble.com/Invalid-geometry-when-using-select-AsText-tp29083589p29085580.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Invalid geometry when using select AsText
Thanks for the quick response, This is a extract of the query AsText from the original column(before transformation) This srid is suposed to be 4326 and I want to make it 900913. "MULTIPOLYGON(((-203203.329774775 921205.762417328,-201414.754122524 920564.899066353,….etc etc etc ……..,-263950.345631436 1215368.70793936,-263772.821121782 1216068.78335908,-263784.403196605 1216749.98205891,-263958.177279213 1216452.48684392)))" btw this is a piece the geometry of norway. greetz...Ramses Nicolas Ribot-2 wrote: > >> >> I am doing a GIS project where I combine shapefiles from different >> sources, >> created with different spatial reference systems. >> >> What I want to achieve is that if someone has a shapefile, no matter what >> the srs is, the data can be combined with other data. All data will be >> tranformed to srid 900913. >> >> I succeeded in combining data from my Dutch and Belgian colleagues by >> using >> the postgis transform function and transforming the geometries from >> "28992"( >> Amersfoort / RD New) and "31370"(Belge 1972 / Belgian Lambert 72) to >> 900913. >> This works perfeclty, the map of the Netherlands and Belgium are >> displayed >> as they should. >> >> My problem is the following. I also have some data from my colleagues >> from >> Spain. Their data supposedly is in "WGS1984" epsg "4326". So I >> transformed >> it to 900913 as I did with my other data. So far so good. BUT when I do a >> SELECT AsText from one of the geometries I get the following: >> >> "MULTIPOLYGON(((inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf >> inf,inf >> inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf >> inf, >> ...etc etc ... inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf >> inf,inf inf,inf inf),(inf inf,inf inf,inf inf,inf inf,inf inf)))" >> >> I think this means that the geometry is invalid. When I read it from my >> application using Hibernate spatial I get an error like invalid geometry. >> >> I tried transforming from 4326 to 900913 and also from 94326 to 900913 >> but >> with no luck. >> >> Has anyone ever got this problem or does anyone knows what is going on >> here? >> >> Thank you, >> >> Ramses > > Hi, > What the spain data look like ? Could you post some extract of it (astext) > ? > It seems the data range is not compatible with WGS84, thus generating > invalid coordinates when transformed. > > Nicolas > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- View this message in context: http://old.nabble.com/Invalid-geometry-when-using-select-AsText-tp29083589p29085540.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Invalid geometry when using select AsText
Ramses, On 06/07/2010, at 17:37 , rdelisabeth wrote: > My problem is the following. I also have some data from my colleagues from > Spain. Their data supposedly is in "WGS1984" epsg "4326". So I transformed > it to 900913 as I did with my other data. So far so good. BUT when I do a > SELECT AsText from one of the geometries I get the following: > > "MULTIPOLYGON(((inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf > inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf, > ...etc etc ... inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf > inf,inf inf,inf inf),(inf inf,inf inf,inf inf,inf inf,inf inf)))" > > I think this means that the geometry is invalid. When I read it from my > application using Hibernate spatial I get an error like invalid geometry. I wonder if you have data from a UTM Grid - do the values look like reasonable longitude and latitude values (in degrees) for Spain. I'm on the wrong side of the planet to be sure what is right, but if you have any values greater than about 45, I think you probably have WGS84 UTM values, which would be in the 10's to 100's of thousands. instead of 4326 try something like 32630... just a guess. cheers Ben ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Invalid geometry when using select AsText
> > I am doing a GIS project where I combine shapefiles from different sources, > created with different spatial reference systems. > > What I want to achieve is that if someone has a shapefile, no matter what > the srs is, the data can be combined with other data. All data will be > tranformed to srid 900913. > > I succeeded in combining data from my Dutch and Belgian colleagues by using > the postgis transform function and transforming the geometries from "28992"( > Amersfoort / RD New) and "31370"(Belge 1972 / Belgian Lambert 72) to 900913. > This works perfeclty, the map of the Netherlands and Belgium are displayed > as they should. > > My problem is the following. I also have some data from my colleagues from > Spain. Their data supposedly is in "WGS1984" epsg "4326". So I transformed > it to 900913 as I did with my other data. So far so good. BUT when I do a > SELECT AsText from one of the geometries I get the following: > > "MULTIPOLYGON(((inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf > inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf, > ...etc etc ... inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf > inf,inf inf,inf inf),(inf inf,inf inf,inf inf,inf inf,inf inf)))" > > I think this means that the geometry is invalid. When I read it from my > application using Hibernate spatial I get an error like invalid geometry. > > I tried transforming from 4326 to 900913 and also from 94326 to 900913 but > with no luck. > > Has anyone ever got this problem or does anyone knows what is going on here? > > Thank you, > > Ramses Hi, What the spain data look like ? Could you post some extract of it (astext) ? It seems the data range is not compatible with WGS84, thus generating invalid coordinates when transformed. Nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Invalid geometry when using select AsText
I am doing a GIS project where I combine shapefiles from different sources, created with different spatial reference systems. What I want to achieve is that if someone has a shapefile, no matter what the srs is, the data can be combined with other data. All data will be tranformed to srid 900913. I succeeded in combining data from my Dutch and Belgian colleagues by using the postgis transform function and transforming the geometries from "28992"( Amersfoort / RD New) and "31370"(Belge 1972 / Belgian Lambert 72) to 900913. This works perfeclty, the map of the Netherlands and Belgium are displayed as they should. My problem is the following. I also have some data from my colleagues from Spain. Their data supposedly is in "WGS1984" epsg "4326". So I transformed it to 900913 as I did with my other data. So far so good. BUT when I do a SELECT AsText from one of the geometries I get the following: "MULTIPOLYGON(((inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf, ...etc etc ... inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf,inf inf),(inf inf,inf inf,inf inf,inf inf,inf inf)))" I think this means that the geometry is invalid. When I read it from my application using Hibernate spatial I get an error like invalid geometry. I tried transforming from 4326 to 900913 and also from 94326 to 900913 but with no luck. Has anyone ever got this problem or does anyone knows what is going on here? Thank you, Ramses -- View this message in context: http://old.nabble.com/Invalid-geometry-when-using-select-AsText-tp29083589p29083589.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users