This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SIG SMTT</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<script src="http://www.openlayers.org/api/OpenLayers.js"></script> | |
<script type="text/javascript"> | |
var map; | |
function init(){ | |
map = new OpenLayers.Map('map'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.template.loader import get_template | |
from django.template import Context | |
import cStringIO as StringIO | |
import cgi | |
import ho.pisa as pisa | |
def render_to_pdf(template_src, context_dict): | |
template = get_template(template_src) | |
context = Context(context_dict) | |
html = template.render(context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def para_ptl(xo,yo,zo,lato,lono,x_geoc,y_geoc,z_geoc): | |
""" | |
xo,yo,zo = origem geocentrica; | |
lato,lono = origem em lat long; | |
x_geoc,y_geoc,z_geoc = ponto a ser convertido; | |
""" | |
rlat = radians(lato) | |
rlot = radians(lono) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestFixture] | |
public class ConverterUnitTest | |
{ | |
[SetUp] | |
public void Init() | |
{ | |
var aoInit = new AoInitializeClass(); | |
aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ParentFinders | |
{ | |
private static ILog _log = LogManager.GetLogger(typeof(ParentFinders)); | |
public static IObject FindParentAmbiguous(IObject obj, ITable parentTable) | |
{ | |
_log.IfInfo("Utilizando método 'toca' para encontrar objeto pai."); | |
if (!(parentTable is IFeatureClass)) | |
throw new ArgumentException("parentTable não é uma feature class."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> p1 = Polygon(((0,0),(0,1),(1,1),(1,0),(0.5,-1),(0,0))) | |
>>> p2 = Polygon(((0.3,0),(0.6,0),(0.5,-1),(0.3,0))) | |
>>> p1 | |
<Polygon object at 0x3363e68> | |
>>> p1.area | |
1.5 | |
>>> p2.area | |
0.15000000000000002 | |
>>> p3 = p1.difference(p2) | |
>>> p3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FormFoda(forms.ModelForm): | |
def __init__(self, usuario, campo, *args, **kwargs): | |
self.usuario = usuario | |
self.campo = campo | |
super(FormFoda, self).__init__(*args,**kwargs ) | |
def save(self, commit=True): | |
if hasattr(self.instance, self.campo): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@login_required | |
def dashboard(request): | |
usuario = request.user | |
perfil_analista = None | |
try: | |
perfil_analista = PerfilAnalistaFundiario.objects.get(user_id=usuario.id) | |
except: | |
raise PermissionDenied |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Requerimento(UserDateAdd, UserDateUpd): | |
""" | |
BaseRequerimento | |
""" | |
tipo = models.CharField(max_length=16, | |
verbose_name=u"Tipo", | |
help_text=u"Tipo de requerimento", | |
choices=TIPO_REQUERIMENTO_CHOICES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"F67-M-0639";19;0.001;0.001;0.001;5;"01010000A0421200003E711617393B46C027A4CC2EA69D34C0A4703D0AD7436A40";"POINT(-44.4626797542173 -20.6158169984448)" | |
"F67-M-0641";19;0.001;0.001;0.001;5;"01010000A0421200008992C220C43846C092CA5CCBA29D34C0A4703D0AD7436A40";"POINT(-44.4434853506146 -20.6157652951757)" | |
"F67-P-0643";19;0.001;0.001;0.001;7;"01010000A042120000B3A63406C23846C09049106F28A234C0A4703D0AD7436A40";"POINT(-44.4434211499296 -20.6334294714703)" | |
"F67-P-0644";19;0.001;0.001;0.001;7;"01010000A042120000760CC305C23846C07693206329A234C0A4703D0AD7436A40";"POINT(-44.4434210970293 -20.6334440187961)" | |
"F67-V-0645";28;0.001;0.001;0.001;6;"01010000A0421200007B184B05C23846C02D8DD5642AA234C0A4703D0AD7436A40";"POINT(-44.4434210411718 -20.6334593793264)" | |
"F67-V-0646";28;0.001;0.001;0.001;6;"01010000A04212000061C28904C23846C0EF7632042CA234C0A4703D0AD7436A40";"POINT(-44.4434209511426 -20.633484136887)" | |
"F67-M-0642";19;0.001;0.001;0.001;5;"01010000A04212000010162FE7C03846C00E3A28E690A434C0A4703D0AD7436A40";"POINT(-44.443386934 |
OlderNewer